gNode-class {graph}R Documentation

Class "gNode"

Description

This is an implemention of a very general graph node class. It is patterned after the descriptions in GXL.

Objects from the Class

Objects can be created by calls of the form new("gNode", ...). These are nodes of a graph and can have any number of attributes.

Slots

label:
Object of class "character" A label of the node. Should be unique within the graph.
fromEdges:
Object of class "list" A vector of the edge identifiers corresponding to the edges starting at that node.
toEdges:
Object of class "list" A vector of the edge identifiers corresponding to the edges pointing to that node.
edgeOrder:
Object of class "list" A vector of edge identifiers indicating the order in which the edges in the slot "fromEdges" would be traversed (may also be used for rendering). If this is of length zero, then the "fromEdges" slot is used for the order.
nodeType:
Object of class "character" the type of node. Could be a factor.
nodeID:
Object of class "Ruuid" a unique identifier.
property:
Object of class "list", holds properties associated with the graph node.

Extends

Class "propertyHolder", directly.

Methods

edgeOrder
signature(object = "gNode"): A method that returns the edgeOrder for the named node.
fromEdges
signature(object = "gNode"): A method that returns the fromEdges.
fromEdges<-
signature(object = "gNode"): A method that assigns the fromEdges
label
signature(object = "gNode"):A method that returns the node label.
nodeID
signature(object = "gNode"): A method that returns the node identifier.
nodeType
signature(object = "gNode"): A method that returns the node type.
toEdges
signature(object = "gNode"): A method that returns the toEdges.
toEdges<-
signature(object = "gNode"): A method that assigns the toEdges.
idstring
signature(x = "gNode"): A method that returns the node identifier as a character string.
initialize
signature(.Object = "gNode", ...): initializer for "gNode" class.

Author(s)

R. Gentleman and Saikat DebRoy

See Also

distGraph-class, graphNEL-class

Examples

node <- new("gNode", label="A")
label(node)
idstring(node)

[Package graph version 1.8.0 Index]