gEdge-class {graph} | R Documentation |
A very generic class for describing the edges of a graph.
Objects can be created by calls of the form new("gEdge", ...)
.
edgeID
:"Ruuid"
a unique
identifier for the edge. edgeType
:"character"
the type of
edge. bNode
:"Ruuid"
identifier of beginning
node for the edge. eNode
:"integer"
identifier of
ending node for the edge. property
:"list"
, holds
properties associated with the edge. It always contains at least
one element of type numeric named "weight"
Class "propertyHolder"
, directly.
signature(object = "gEdge")
: A method that
returns the identifier for the begining node of the edge.signature(object = "gEdge")
: A method that
returns the identifier for the ending node of the edge.signature(object = "gEdge")
: A method that
returns the edge identifier. signature(x = "gEdge")
: A method that returns
the edge identifier as a character string.signature(.Object = "gEdge", ...)
:
initializer for "gEdge"
class.
Based on GXL's definition of edges.
R. Gentleman and Saikat DebRoy
nodeA <- new("gNode", label="A") nodeB <- new("gNode", label="A") edgeAB <- new("gEdge", bNode=nodeA, eNode=nodeB) idstring(edgeAB) bNode(edgeAB) == nodeID(nodeA) eNode(edgeAB) == nodeID(nodeB) fromEdges(nodeA) <- fromEdges(nodeB) <- list(edgeAB) toEdges(nodeA) <- toEdges(nodeB) <- list(edgeAB) fromEdges(nodeA) toEdges(nodeA) fromEdges(nodeB) toEdges(nodeB)