MatrixLabelDigraph

net.walend.disentangle.graph.mutable.MatrixLabelDigraph
See theMatrixLabelDigraph companion object
case class MatrixLabelDigraph[Node, Label](outNodes: IndexedSet[Node], edgeMatrix: Vector[ArrayBuffer[Label]], noEdgeExistsLabel: Label) extends IndexedLabelDigraph[Node, Label] with MutableLabelDigraph[Node, Label]

Provides constant-time access and mutator for edges. Stores Nodes in a Vector and Labels in a Vector of ArrayBuffers.

The constructor is O(n)

Attributes

Since:

v0.1.0

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait MutableLabelDigraph[Node, Label]
trait IndexedLabelDigraph[Node, Label]
trait IndexedGraph[Node]
trait LabelDigraph[Node, Label]
trait Digraph[Node]
trait Graph[Node]
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Classlikes

case class InnerEdge(from: InnerNodeType, to: InnerNodeType, label: Label) extends LabelDigraphEdgeTrait

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class InnerNode(value: Node, index: Int) extends DigraphInnerNodeTrait with InnerIndexedNodeTrait

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Inherited classlikes

Attributes

Inherited from:
Digraph
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Inherited from:
Digraph
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class InNode
class InnerNode
class InnerNode

An internal representation of edges within the graph

An internal representation of edges within the graph

Attributes

Inherited from:
Graph
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

An internal representation of nodes within the graph

An internal representation of nodes within the graph

Attributes

Inherited from:
IndexedGraph
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class InNode
class InnerNode
class InNode
class InnerNode

An internal representation of nodes within the graph

An internal representation of nodes within the graph

Attributes

Inherited from:
Graph
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Inherited from:
LabelDigraph
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class InnerEdge
class InnerEdge

Types

override type InnerEdgeType = InnerEdge

The edge type returned by this graph representation

The edge type returned by this graph representation

Attributes

override type InnerNodeType = InnerNode

The type of InnerNodeTrait for this digraph representation

The type of InnerNodeTrait for this digraph representation

Attributes

Inherited types

type OuterEdgeType = (Node, Node, Label)

The edge type used to build this graph representation

The edge type used to build this graph representation

Attributes

Inherited from:
LabelDigraph

Value members

Concrete methods

override def edge(from: InnerNode, to: InnerNode): Option[InnerEdge]

Attributes

Definition Classes
override def edges: Vector[(Node, Node, Label)]

O(n^2)

O(n^2)

Attributes

Returns:

All of the edges in the graph

Definition Classes
override def innerEdges: Vector[InnerEdgeType]

Attributes

Returns:

A Traversable of the edges as represented in the graph

Definition Classes
override def innerNode(value: Node): Option[InnerNode]

O(ln(n))

O(ln(n))

Attributes

Definition Classes
override def innerNodeForIndex(i: Int): InnerNode

O(1)

O(1)

Attributes

Definition Classes

O(n)

O(n)

Attributes

Returns:

InnerNode representation of all of the nodes in the graph.

Definition Classes
override def label(from: InnerNode, to: InnerNode): Label

O(1)

O(1)

Attributes

Returns:

the edge between start and end or noEdgeExistsValue

Definition Classes
override def label(i: Int, j: Int): Label

O(1)

O(1)

Attributes

Definition Classes
override def node(i: Int): Node

O(1)

O(1)

Attributes

Definition Classes
override def nodeCount: Int

O(1)

O(1)

Attributes

Definition Classes
override def nodes: IndexedSet[Node]

O(1)

O(1)

Attributes

Definition Classes
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
Any
override def upsertEdge(from: InnerNode, to: InnerNode, label: Label): Unit

O(1)

O(1)

Attributes

Definition Classes

Inherited methods

def edge(from: Node, to: Node): Option[InnerEdgeType]

Attributes

Inherited from:
Digraph
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

val nodeToInNode: Map[Node, InnerNode]