AdjacencyDigraph

net.walend.disentangle.graph.AdjacencyDigraph
See theAdjacencyDigraph companion object
class AdjacencyDigraph[Node](outNodes: IndexedSet[Node], outSuccessors: IndexedSet[IndexedSet[(Node, Node)]], outPredecessors: IndexedSet[IndexedSet[(Node, Node)]]) extends Tuple2Digraph[Node] with IndexedGraph[Node]

Provides constant-time access for successor and predecessor edges of a node.

The constructor is O(n + a ln(n))

Attributes

Since:

v0.2.1

Companion:
object
Graph
Supertypes
trait IndexedGraph[Node]
trait Tuple2Digraph[Node]
trait Digraph[Node]
trait Graph[Node]
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Classlikes

case class InNode(value: Node, index: Int) extends DigraphInnerNodeTrait with InnerIndexedNodeTrait

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class InnerEdge(from: InNode, to: InNode) extends DigraphInnerEdgeTrait

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

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 = InNode

The type of InnerNodeTrait for this digraph representation

The type of InnerNodeTrait for this digraph representation

Attributes

Inherited types

type OuterEdgeType = (Node, Node)

The edge type used to build this graph representation

The edge type used to build this graph representation

Attributes

Inherited from:
Tuple2Digraph

Value members

Concrete methods

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

Attributes

Definition Classes

O(n^2)

O(n^2)

Attributes

Returns:

All of the edges in the graph

Definition Classes

Attributes

Returns:

A Traversable of the edges as represented in the graph

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

O(ln(n))

O(ln(n))

Attributes

Returns:

Some inner node if it exists in the digraph or None

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

O(1)

O(1)

Attributes

Definition Classes

O(1)

O(1)

Attributes

Returns:

InnerNode representation of all of the nodes in the graph.

Definition Classes
def neighborSet(indexedSet: IndexedSet[(Node, Node)]): IndexedSet[InnerEdgeType]
override def node(i: Int): Node

O(1)

O(1)

Attributes

Definition Classes
override def nodeCount: Int

Attributes

Returns:

number of nodes in the graph

Definition Classes
def nodes: IndexedSet[Node]

All the nodes in the graph, in an indexed set

All the nodes in the graph, in an indexed set

Attributes

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

Inherited methods

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

Attributes

Inherited from:
Digraph