GraphBodyBuilder

open class GraphBodyBuilder[LN, LE, V]

This class may be used to build a GraphBody using an imperativeprogramming style. Moreover, it introduce mutable assignments implemented directly as fields of nodes, which should be faster than hashmap based assignments.

Type parameters:
LE

type of labels for edges

LN

type of labels for nodes

V

the type for the values assumed by the unknowns

Companion:
object
Source:
GraphBodyBuilder.scala
class Object
trait Matchable
class Any

Type members

Classlikes

class GraphMutableAssignment(rho: U => V) extends MutableAssignment[U, V]

A mutable assignment for equation system built with GraphBodyBuilder.

A mutable assignment for equation system built with GraphBodyBuilder.

This mutable assignment is implemented by endowing each node with an assignments field, which is a collection.mutable.ArrayBuffer of elements of type V. Each index of the array corresponds to a different assignment. A global counter keep track of the next available index which may be allocated by a GraphMutableAssignment.

Source:
GraphBodyBuilder.scala

Types

type E = Edge[LN, LE, V]

Type of edges of the generated graph body.

Type of edges of the generated graph body.

Source:
GraphBodyBuilder.scala
type U = Node[LN, LE, V]

Type of nodes (unknowns) of the generated graph body.

Type of nodes (unknowns) of the generated graph body.

Source:
GraphBodyBuilder.scala

Value members

Concrete methods

def addEdge(label: LE, sources: Seq[U], target: U, action: (U => V) => V): E

Adds an (hyper-)edge to the graph.

Adds an (hyper-)edge to the graph.

Value parameters:
action

the action of this edge (see EdgeAction).

label

the label of the edge.

sources

the sequences of source nodes of the edge.

target

the target node of the edge.

Returns:

the added edge.

Source:
GraphBodyBuilder.scala
def addNode(label: LN): U

Adds a node to the graph.

Adds a node to the graph.

Value parameters:
label

the label of the node.

Returns:

the added node.

Source:
GraphBodyBuilder.scala
def toGraphBody(combiner: (V, V) => V): GraphBody[U, V, E]

Returns the graph body built by this GraphBodyBuilder.

Returns the graph body built by this GraphBodyBuilder.

Source:
GraphBodyBuilder.scala