adjamat {mathgraph} | R Documentation |
Returns an object of class "adjamat"
which is the adjacency
matrix of a numbered graph.
adjamat(x, ...) adjamat.mathgraph(x, general=FALSE, ...) is.adjamat(x)
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. |
adjamat
is a generic function with a method for
class "mathgraph"
.
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.
The general
argument to adjamat.mathgraph
is not
functional.
S Poetry, Patrick J. Burns, http://www.burns-stat.com/pages/spoetry.html
Nick Efthymiou
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.
mathgraph
, incidmat
,
getpath.adjamat
adjamat(mathgraph(~ 1:3 * 3:5, dir=TRUE))