incidmat: Incidence Matrix for a Mathematical Graph

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

Description

Returns an object of class "incidmat" which is a matrix indicating the start and end node for each edge in the graph.

Usage

1
2
3
4
5
incidmat(x, ...)
## S3 method for class 'mathgraph'
incidmat(x, expand=TRUE, general=FALSE, ...)

is.incidmat(x)

Arguments

x

object representing a mathematical graph.

expand

logical flag: if TRUE, then undirected edges are represented by two columns in the output.
If FALSE, then both non-zero elements of an undirected edge are positive.

general

logical flag: if TRUE, then there is a non-zero entry in a column representing a loop.

...

generic arguments.

Details

The incidmat function is generic, with a method for class "mathgraph".

is.incidmat is the membership function for this class.

Value

an object of class "incidmat" which is a matrix with rows representing nodes and columns representing edges.
Generally speaking, there is a 1 in the location where an edge begins and a -1 in the location where it ends.
Frank Harary defines incidence matrix with expand = FALSE.

Note

From S Poetry, Patrick J. Burns, Section 13.3, p. 312 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. 160. Addison Wesley.

See Also

adjamat, mathgraph, getpath.incidmat

Examples

1
2
3
incidmat(mathgraph(~ 1:3 / 3:5, dir=TRUE))
incidmat(mathgraph(~ 1:3 / 3:5, dir=FALSE))
incidmat(mathgraph(~ 1:3 / 3:5, dir=FALSE), expand=FALSE)

mathgraph documentation built on May 2, 2019, 11:04 a.m.