graphAM-class {graph}R Documentation

Class "graphAM"

Description

A graph class where node and edge information is represented as an adjacency matrix. The adjacency matrix is square and element adjMat[i, j] is non-zero if there is an edge from node i to node j.

Objects from the Class

Objects can be created by calls of the form new("graphAM", adjMat, edgemode, values).

Slots

adjMat:
An adjacency "matrix" describing the graph structure. The colnames of the matrix will be used as node names for the graph if present.
edgemode:
A "character" vector specifying whether the graph is "directed" or "undirected".
edgeData:
Storage for edge attributes.
nodeData:
Storage for node attributes.

Extends

Class "graph", directly.

Methods

addEdge
signature(from = "character", to = "character", graph = "graphAM", weights = "missing"): ...
addNode
signature(object = "graphAM", nodes = "character"): ...
clearNode
signature(node = "character", object = "graphAM"): ...
coerce
signature(from = "graphAM", to = "graphNEL"): ...
edges
signature(object = "graphAM", which = "missing"): ...
edges
signature(object = "graphAM", which = "character"): ...
initialize
signature(.Object = "graphAM"): ...
isAdjacent
signature(object = "graphAM", from = "character", to = "character"): ...
nodes<-
signature(object = "graphAM", value = "character"): ...
nodes
signature(object = "graphAM"): ...
numEdges
signature(graph = "graphAM"): ...
numNodes
signature(object = "graphAM"): ...
removeEdge
signature(from = "character", to = "character", graph = "graphAM"): ...
removeNode
signature(node = "character", object = "graphAM"): ...

Author(s)

Seth Falcon

See Also

graph-class, graphNEL-class

Examples

    mat <- matrix(c(0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0),
                  byrow=TRUE, ncol=4)
    rownames(mat) <- letters[1:4]
    colnames(mat) <- letters[1:4]
    g1 <- new("graphAM", adjMat=mat)

[Package graph version 1.8.0 Index]