adjamat: Adjacency Matrix of a Mathematical Graph

Description Usage Arguments Details Value BUGS Note Author(s) References See Also Examples

Description

Returns an object of class "adjamat" which is the adjacency matrix of a numbered graph.

Usage

1
2
3
4
5
adjamat(x, ...)
## S3 method for class '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.

Details

adjamat is a generic function with a method for class "mathgraph".

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.

Note

S Poetry, Patrick J. Burns, http://www.burns-stat.com/pages/spoetry.html

Author(s)

Nick Efthymiou

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.

See Also

mathgraph, incidmat, getpath.adjamat

Examples

1
adjamat(mathgraph(~ 1:3 * 3:5, dir=TRUE))

ClausDethlefsen/mathgraph documentation built on May 25, 2019, 1:36 p.m.