reorder_vertices: Reorder the vertices of a hypergraph.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/reorder_vertices.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
   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)

HyperG documentation built on March 4, 2021, 5:06 p.m.