GraphBuilder

com.phasmidsoftware.gryphon.builder.GraphBuilder
See theGraphBuilder companion class
object GraphBuilder

Companion object providing factory methods for the two standard graph flavours.

Usage (built-in types):

val g: Try[UndirectedGraph[Int, Double]] =
 GraphBuilder.undirected[Int, Double].fromResource("prim.graph")

val g: Try[DirectedGraph[Int, Double]] =
 GraphBuilder.directed[Int, Double].fromResource("routes.graph")

Usage (custom types — supply Parseable instances for V and E):

given Parseable[Building] = ...
given Parseable[TunnelProperties] = ...

val g: Try[UndirectedGraph[Building, TunnelProperties]] =
 GraphBuilder.undirected[Building, TunnelProperties].fromResource("tunnels.graph")

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def directed[V : Parseable, E : Parseable]: GraphBuilder[V, E, DirectedGraph[V, E]]

Returns a GraphBuilder that produces DirectedGraph[V, E] instances.

Returns a GraphBuilder that produces DirectedGraph[V, E] instances.

Type parameters

E

the edge attribute type; must have a Parseable instance.

V

the vertex attribute type; must have a Parseable instance.

Attributes

Returns a GraphBuilder that produces UndirectedGraph[V, E] instances.

Returns a GraphBuilder that produces UndirectedGraph[V, E] instances.

Type parameters

E

the edge attribute type; must have a Parseable instance.

V

the vertex attribute type; must have a Parseable instance.

Attributes