Triplets

com.phasmidsoftware.gryphon.core.Triplets
case class Triplets[V, E, Z](triplets: Seq[Triplet[V, E, Z]]) extends SerializableGraph[V, E, Z]

A case class representing a collection of graph triplets.

Each triplet in the collection encapsulates information about two vertices and their connecting edge (if one exists) in a graph structure. This class extends the SerializableGraph trait, allowing it to support serialization and traversal of the contained triplets.

Type parameters

E

the type associated with the edges in the triplets.

V

the type associated with the vertices in the triplets.

Z

the auxiliary type used within the triplet or graph structure.

Value parameters

triplets

the sequence of triplets representing the graph structure.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait SerializableGraph[V, E, Z]
class Object
trait Matchable
class Any
Show all

Members list

Value members

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