The LAG context
The LAG context
The context is used for creating, importing, exporting, and manipulating matrices and vectors.
A LAG context defines the dimension of the problem, ie number of vertices.
A LAG context may be used for any number of matrices and vectors.
Matrices and vectors in one context cannot be mixed with matrices and vectors in a different context.
The Distributed LAG context
The Distributed LAG context
The context is used for creating, importing, exporting, and manipulating matrices and vectors in a distributed (i.e., Spark) environment.
A LAG context defines the dimension of the problem, ie number of vertices.
The distributed LAG context also specifies the blocking for vectors and matrices.
A LAG context may be used for any number of matrices and vectors.
Matrices and vectors in one context cannot be mixed with matrices and vectors in a different context.
An adjacency matrix.
An adjacency matrix. In LAG, all Matrices are created using an instance of 'LagContext'.
the type of elements in the matrix
A semigroup for use in LAG.
A semigroup for use in LAG.
the type of the elements operated on by this semigroup.
the semigroup function, the function must respect semiring properties for annihilator (if specified) and identity (if specified)
an optional annihilator for the function
an optional identity for the fucntion
A semiring, that is, an abstraction of addition and multiplication in the context of LAG
A semiring, that is, an abstraction of addition and multiplication in the context of LAG
the type of the elements operated on by this semiring.
Provides implementations for Numeric that are not required for LagSemiring
Provides implementations for Numeric that are not required for LagSemiring
the type operated on by this semiring.
The (non-distributed) LAG context
The (non-distributed) LAG context
The context is used for creating, importing, exporting, and manipulating matrices and vectors in a pure Scala environment.
A LAG context defines the dimension of the problem, ie number of vertices.
A LAG context may be used for any number of matrices and vectors.
Matrices and vectors in one context cannot be mixed with matrices and vectors in a different context.
A vector.
A vector. In LAG, all Vectors are created using an instance of 'LagContext'.
Several fundamental graph algorithms as algebraic operations from:
Several fundamental graph algorithms as algebraic operations from:
Fineman, Jeremy T., and Eric Robinson. "Fundamental graph algorithms." Graph Algorithms in the Language of Linear Algebra 22 (2011): 45.
TODO: move to tests
Object containing map (Map[String, List[(Long, Long)]]) definitions of standard graphs
Companion object for LagContext.
Companion object for LagContext. In addition to general utility functions, also contains functions that facilitate import and export of vectors and matrices.
Companion object for LagSemigroup.
Companion object for LagSemigroup. Handles +/- infinity.
Companion object to the LagSemiring class.
Companion object to the LagSemiring class. Provides a factory for LagSemeiring. Also, provides templated versions of well know semirings.
Lag Utility object
Provides classes for dealing with complex numbers. Also provides implicits for converting to and from
Int
.Overview
The main class to use is com.ibm.lagraph.LagContext, as so
If you include com.ibm.lagraph.LagSemiring, you can convert numbers more directly