Edge {rdecision} | R Documentation |
An edge in a graph
Description
An R6 class representing an edge in a graph.
Details
Edges are the formal term for links between pairs of nodes in a graph. A base class.
Methods
Public methods
Method new()
Create an object of type Edge
.
Usage
Edge$new(v1, v2, label = "")
Arguments
v1
Node at one endpoint of the edge.
v2
Node at the other endpoint of the edge.
label
Character string containing the edge label.
Returns
A new Edge
object.
Method is_same_edge()
Is this edge the same as the argument?
Usage
Edge$is_same_edge(e)
Arguments
e
edge to compare with this one
Returns
TRUE
if e
is also this one.
Method endpoints()
Retrieve the endpoints of the edge.
Usage
Edge$endpoints()
Returns
List of two nodes to which the edge is connected.
Method label()
Access label.
Usage
Edge$label()
Returns
Label of the edge; character string.
Method clone()
The objects of this class are cloneable with this method.
Usage
Edge$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Author(s)
Andrew J. Sims andrew.sims@newcastle.ac.uk
[Package rdecision version 1.2.1 Index]