A purely functional builder that constructs a typed graph from a resource file or file-system path, using the GraphParser / Parseable infrastructure.
GraphBuilder is parameterised on the vertex type V, edge type E, and the concrete graph type G. Callers obtain an instance via the companion-object factory methods GraphBuilder.undirected and GraphBuilder.directed, which supply the appropriate triplesToTryGraph function for each graph flavour.
The two Parseable context bounds are satisfied automatically for the built-in types Int, Double, String, etc., and can be provided by the caller for custom domain types (e.g. Building, TunnelProperties).
Type parameters
- E
-
the edge attribute type.
- G
-
the concrete graph type, must be a subtype of
Graph[V]. - V
-
the vertex attribute type.
Value parameters
- build
-
a function that converts a sequence of parsed triplets into a
Try[G].
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any