VertexPairList

com.phasmidsoftware.gryphon.core.VertexPairList
case class VertexPairList[V](pairs: Seq[(V, V, EdgeType)]) extends SerializableGraph[V, Unit, EdgeType], Pairs[V, EdgeType]

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.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Pairs[V, EdgeType]
trait SerializableGraph[V, Unit, EdgeType]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def triplets: Seq[Triplet[V, Unit, EdgeType]]

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.

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
def serialize: String

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.

Inherited from:
SerializableGraph