A trait representing a serializable graph structure.
SerializableGraph provides the capability to serialize and traverse through its triplets, where each triplet represents an edge or vertex pair in the graph. Each triplet consists of two vertices (source and target) and an edge attribute connecting them (if any).
Type parameters
E
the type associated with the edges in the graph.
V
the type associated with the vertices in the graph.
Retrieves a sequence of triplets representing the graph structure. Each triplet consists of two vertices (source and target) of type V and an edge attribute of type E connecting them, if any.
Retrieves a sequence of triplets representing the graph structure. Each triplet consists of two vertices (source and target) of type V and an edge attribute of type E connecting them, if any.
Attributes
Returns
a sequence of triplets where each triplet is represented as a tuple Triplet[V, E].
Serializes the sequence of triplets into a string representation. Each triplet is converted to a comma-separated string of its elements, and the entire sequence is joined using newline characters.
Serializes the sequence of triplets into a string representation. Each triplet is converted to a comma-separated string of its elements, and the entire sequence is joined using newline characters.
Attributes
Returns
a string representation of the triplets, where each triplet is serialized as "source, target, attribute" and each serialized triplet is separated by a newline.