Package

com.ibm

lagraph

Permalink

package lagraph

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

scala> val complex = LagContext(4,3)
complex: com.ibm.lagraph.LagContext = 4 + 3i

If you include com.ibm.lagraph.LagSemiring, you can convert numbers more directly

scala> import com.ibm.lagraph.LagSemiring._
scala> val complex = 4 + 3.i
complex: com.ibm.lagraph.Complex = 4 + 3i
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. lagraph
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait LagContext extends AnyRef

    Permalink

    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.

  2. final case class LagDstrContext(sc: SparkContext, graphSize: Long, nblock: Int, DEBUG: Boolean = false) extends LagContext with Product with Serializable

    Permalink

    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.

  3. abstract class LagMatrix[T] extends Serializable

    Permalink

    An adjacency matrix.

    An adjacency matrix. In LAG, all Matrices are created using an instance of 'LagContext'.

    T

    the type of elements in the matrix

  4. case class LagSemigroup[T](op: (T, T) ⇒ T, annihilator: Option[T] = None, identity: Option[T] = None) extends (T, T) ⇒ T with Product with Serializable

    Permalink

    A semigroup for use in LAG.

    A semigroup for use in LAG.

    T

    the type of the elements operated on by this semigroup.

    op

    the semigroup function, the function must respect semiring properties for annihilator (if specified) and identity (if specified)

    annihilator

    an optional annihilator for the function

    identity

    an optional identity for the fucntion

  5. trait LagSemiring[T] extends Serializable

    Permalink

    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

    T

    the type of the elements operated on by this semiring.

  6. trait LagSemiringAsNumeric[T] extends Numeric[T]

    Permalink

    Provides implementations for Numeric that are not required for LagSemiring

    Provides implementations for Numeric that are not required for LagSemiring

    T

    the type operated on by this semiring.

  7. final case class LagSmpContext(graphSize: Long) extends LagContext with Product with Serializable

    Permalink

    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.

  8. abstract class LagVector[T] extends Serializable

    Permalink

    A vector.

    A vector. In LAG, all Vectors are created using an instance of 'LagContext'.

Value Members

  1. object Fundamental

    Permalink

    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

  2. object GraphLib

    Permalink

    Object containing map (Map[String, List[(Long, Long)]]) definitions of standard graphs

  3. object LagContext

    Permalink

    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.

  4. object LagSemigroup extends Serializable

    Permalink

    Companion object for LagSemigroup.

    Companion object for LagSemigroup. Handles +/- infinity.

  5. object LagSemiring extends Serializable

    Permalink

    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.

  6. object LagUtils

    Permalink

    Lag Utility object

Inherited from AnyRef

Inherited from Any

Ungrouped