A case class representing a list of vertex pairs in a graph.
CONSIDER eliminate this class.
This class provides a concrete implementation of SerializableGraph and Pairs, enabling functionalities such as accessing the pairs of vertices and transforming these pairs into triplets. Each triplet includes the source vertex, target vertex, and a unit value indicating the absence of an explicit edge attribute.
Type parameters
V
the type of attributes associated with the vertices in the graph.
Value parameters
pairs
a sequence of tuples, where each tuple contains two vertices representing a connection or relationship in the graph.
Transforms the pairs of vertices into a sequence of triplets. Each triplet includes a source vertex, a target vertex, an optional attribute (set to None), and the corresponding edge type.
Transforms the pairs of vertices into a sequence of triplets. Each triplet includes a source vertex, a target vertex, an optional attribute (set to None), and the corresponding edge type.
Attributes
Returns
a sequence of triplets, where each triplet contains a source vertex, a target vertex, None as the optional attribute, and the edge type.
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.