Returns an object of class "adjamat" which is the adjacency
matrix of a numbered graph.
Usage
adjamat(x, …)
# S3 method for mathgraph
adjamat(x, general=FALSE, …)
is.adjamat(x)
Arguments
x
an object of class "mathgraph".
general
logical flag, if TRUE, then multiple edges or
arcs between the same nodes are counted; otherwise, there is
a 1 no matter how many edges or arcs there are.
…
other arguments for generic function.
Value
An object of class "adjamat" which is a square matrix with as many
rows and columns as there are nodes in the numbered graph.
The i,j element is an indicator of an arc from
node i to node j.
An undirected edge between nodes i and j contributes
a 1 to both the i,j element and
the j,i element.
is.adjamat is the membership function for this class.
BUGS
The general argument to adjamat.mathgraph is not
functional.
Details
adjamat is a generic function with a method for
class "mathgraph".
References
Chachra, V., Ghare, P. M. and Moore, J. M. (1979).
Applications of Graph Theory Algorithms.
Elvesier North Holland, New York.
Harary, Frank (1969). Graph Theory, p. 158.
Addison Wesley.