propertyHolder-class {graph} | R Documentation |
This is a virtual class used as a base class for graph edge and node classes. This is used to hold named properties associated with objects from its super classes.
A virtual Class: No objects may be created from it.
property
:"list"
, a named list
of properties.signature(x = "propertyHolder", prop =
"character")
: A method for accessing the property named in
prop
.signature(x = "propertyHolder", prop =
"character")
: A method for setting the property named in
prop
.Saikat DebRoy
gNode-class
and gEdge-class
are
super classes of "propertyHolder"
. The later always holds a
numeric property named "weight".
nodeA <- new("gNode", label="A") nodeB <- new("gNode", label="A") edgeAB <- new("gEdge", bNode=nodeA, eNode=nodeB) property(edgeAB, "weight") # default weight is 1.0 property(edgeAB, "weight") <- 2.0 property(edgeAB, "weight")