ProtoConnexions

com.phasmidsoftware.gryphon.core.ProtoConnexions
See theProtoConnexions companion object
case class ProtoConnexions[V, Z](pairs: Seq[(V, V, Z)]) extends SerializableGraph[V, Unit, Z]

Represents a collection of directed connections between vertices, where each connection is associated with an additional attribute of type Z. The connections are stored as a sequence of tuples (V, V, Z), where the first element is the source vertex, the second is the target vertex, and the third is the associated attribute.

Type parameters

V

the type of the vertices in the connections.

Z

the type of the additional attribute associated with each connection.

Value parameters

pairs

a sequence of tuples representing the connections. Each tuple consists of a source vertex, a target vertex, and an additional attribute of type Z.

Attributes

Constructor

Creates an instance of ProtoConnexions initialized with a sequence of (V, V, Z) tuples.

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

Members list

Value members

Concrete methods

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

Converts the current collection of directed connections represented as pairs of vertices into a sequence of triplets. Each triplet consists of the source vertex, the target vertex, a unit value, and an additional attribute of type Z.

Converts the current collection of directed connections represented as pairs of vertices into a sequence of triplets. Each triplet consists of the source vertex, the target vertex, a unit value, and an additional attribute of type Z.

Attributes

Returns

a sequence of triplets where each triplet is of the form (V, V, Unit, Z). The first element represents the source vertex, the second represents the target vertex, the third is a unit value, and the fourth corresponds to the additional attribute.

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