Description Usage Arguments Details Value Author(s) Examples
Remove vertices whose removal does not disconnect the hypergraph.
1 | remove.redundant.vertices(H, check.empty = TRUE)
|
H |
a hypergraph. |
check.empty |
logical. See details. |
This function was created with a binary term document hypergraph in mind.
The idea is to remove words that appear in large documents, in order
of decreasing degree, so long as the removal does not disconnect the
graph. The argument check.empty
is to ensure that removing a word
does not result in an empty document. If this is set to FALSE, the resultant
hypergraph may be much smaller than expected.
a hypergraph.
David J. Marchette dmarchette@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | edges <- list(letters[c(1:4,9)],
letters[3:9],
letters[c(3,6:9)],
letters[c(3,5:9)],
letters[2:9])
h1 <- hypergraph_from_edgelist(edges)
h <- remove.redundant.vertices(h1)
# removed c, f, g, i
h2 <- hypergraph_from_edgelist(list(letters[1:3],
letters[3:5]))
h <- remove.redundant.vertices(h2)
## h == h2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.