Edge<V, E> class abstract

An edge withing a graph connects a source and a target vertex.

Edges are typically ephemeral objects and are only created on demand.

There are two types of edges, DirectedEdge and UndirectedEdge. The only difference is that undirected edges consider source and target interchangeable for comparison operations. The value is never used for comparison.

Mixed-in types

Constructors

Edge(V source, V target, {E? value})
Generative constructor.
const
Edge.directed(V source, V target, {E? value})
Constructs a directed edge.
const
factory
Edge.undirected(V source, V target, {E? value})
Constructs an undirected edge.
const
factory

Properties

defaultToStringPrinter ObjectPrinter
Override to configure the empty ObjectPrinter.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isDirected bool
Returns true, if the edge is directed.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source → V
Origin vertex of this edge.
final
target → V
Destination vertex of this edge.
final
toStringPrinter ObjectPrinter
Override and call super to add values to the ObjectPrinter.
no setterinherited
value → E
Edge specific data.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Standard toString implementation. Do not override, instead implement toStringPrinter to customize.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited