SerializableGraph

com.phasmidsoftware.gryphon.core.SerializableGraph
See theSerializableGraph companion object
trait SerializableGraph[V, E, Z]

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.

Z

the generic type for edge type.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class EdgeList[V, E, Z]
class ProtoConnexions[V, Z]
class Triplets[V, E, Z]
class VertexPairList[V]

Members list

Value members

Abstract methods

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

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].

Concrete methods

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.