convertGroupPair {ppsbm} | R Documentation |
Convert group pair
Description
Gives the index in (directed) or
(undirected) that corresponds to group pair
. Works also for vectors of indices
and
.
Usage
convertGroupPair(q, l, Q, directed = TRUE)
Arguments
q |
Group index |
l |
Group index |
Q |
Total number of groups |
directed |
Boolean for directed (TRUE) or undirected (FALSE) case |
Details
Relations between groups are stored in vectors, whose indexes depend on whether the graph is directed or undirected.
- Directed case :
-
The
group pair is converted into the index
- Undirected case :
-
The
group pair with
is converted into the index
Value
Index corresponding to the group pair
Examples
# Convert the group pair (3,2) into an index, where the total number of group is 3,
# for directed and undirected graph
q <- 3
l <- 2
Q <- 3
directedIndex <- convertGroupPair(q,l,Q)
undirectedIndex <- convertGroupPair(q,l,Q, FALSE)
[Package ppsbm version 0.2.2 Index]