reorder_vertices {HyperG}R Documentation

Reorder the vertices of a hypergraph.

Description

Return a hypergraph in which the vertices have been reordered so that they are in the given order as columns of the incidence matrix.

Usage

reorder_vertices(h,ord,decreasing=FALSE)

Arguments

h

a hypergraph.

ord

an ordering of the vertices.

decreasing

if ord is not given, the order function is called on the names of the vertices as controlled by the decreasing variable.

Value

a hypergraph.

Author(s)

David J. Marchette dmarchette@gmail.com

See Also

order

Examples

   h <- hypergraph_from_edgelist(list(3:7,8:12,c(1,3,9)))
	k <- reorder_vertices(h)
	hnames(h)
	hnames(k)

   h <- hypergraph_from_edgelist(list(letters[3:7],letters[8:12],
	                                   LETTERS[c(1,3,9)]))
	k <- reorder_vertices(h)
	hnames(h)
	hnames(k)


[Package HyperG version 1.0.0 Index]