An R6 class representing an edge in a graph.
Andrew J. Sims andrew.sims@newcastle.ac.uk
new()
Create an object of type Edge
.
Edge$new(v1, v2, label = "")
v1
Node at one endpoint of the edge.
v2
Node at the other endpoint of the edge.
label
Character string containing the edge label.
A new Edge
object.
is_same_edge()
Is this edge the same as the argument?
Edge$is_same_edge(e)
e
edge to compare with this one
TRUE
if e
is also this one.
endpoints()
Retrieve the endpoints of the edge.
Edge$endpoints()
List of two nodes to which the edge is connected.
label()
Access label.
Edge$label()
Label of the edge; character string.
clone()
The objects of this class are cloneable with this method.
Edge$clone(deep = FALSE)
deep
Whether to make a deep clone.
Edges are the formal term for links between pairs of nodes in a graph. A base class.