EdgeList

com.phasmidsoftware.gryphon.core.EdgeList
case class EdgeList[V, E, Z](edges: Seq[Edge[V, E]]) extends SerializableGraph[V, E, Z], Edges[V, E]

Represents a graph structure defined by a sequence of edges. Each edge connects two vertices of type V and contains an attribute of type E. The EdgeList class allows for operations on the edges of the graph, such as transforming them into a sequence of triplets.

CONSIDER eliminate this type.

The graph is also associated with a type parameter Z, which can be used to define additional properties or characteristics of the graph or edges, such as edge types.

Type parameters

E

the type of the attributes associated with the edges.

V

the type of the vertices in the graph.

Z

a type parameter to describe additional properties, such as the nature of the edges.

Value parameters

edges

a sequence of edges that define the connections in the graph. Each edge connects a source vertex (white) and a target vertex (black), and may carry an associated attribute (attribute) and type (edgeType).

Attributes

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

Members list

Value members

Concrete methods

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

Generates a sequence of triplets, where each triplet represents an edge in the graph. Each triplet contains the source vertex, the target vertex, the attribute associated with the edge, and the type of the edge cast to type Z.

Generates a sequence of triplets, where each triplet represents an edge in the graph. Each triplet contains the source vertex, the target vertex, the attribute associated with the edge, and the type of the edge cast to type Z.

Attributes

Returns

a sequence of Triplet[V, E, Z], where each triplet describes the white vertex, the black vertex, the edge attribute (attribute), and the edge type (edgeType) of an edge in the graph.

Inherited methods

def pairs: Seq[(V, V, EdgeType)]

Retrieves a sequence of pairs of vertices representing the connections in the graph. Each pair corresponds to an edge in the graph, where the first element is the starting vertex and the second element is the ending vertex of the edge.

Retrieves a sequence of pairs of vertices representing the connections in the graph. Each pair corresponds to an edge in the graph, where the first element is the starting vertex and the second element is the ending vertex of the edge.

Attributes

Returns

a sequence of vertex pairs (V, V) representing the connections in the graph. Each pair corresponds to the white and black vertices of an edge.

Inherited from:
Edges
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