sort.mathgraph: Sort a Mathematical Graph

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

Description

Sorts nodes within undirected edges and/or edges by nodes.

Usage

1
sortmathgraph(x, nodes = TRUE, edges = TRUE)

Arguments

x

an object that inherits from mathgraph.

nodes

logical value; if TRUE, then the nodes within undirected edges are sorted.

edges

logical value; if TRUE, then the edges are sorted by the first node with ties broken by the second node.

Value

an object that represents the same graph as the input, but with some rearrangement.

Author(s)

Nick Efthymiou

References

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

See Also

mathgraph

Examples

1
2
3
4
jjmg <- c(mathgraph(~ 4:2 * 1:3), mathgraph(~ 3:5 / 1:3))
sortmathgraph(jjmg)
sortmathgraph(jjmg, node=FALSE)
sortmathgraph(jjmg, edge=FALSE)

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