Learn R Programming

graphclust (version 1.3)

degreeSort: Sort stochastic block model parameter in a unique way using its graphon

Description

Sort stochastic block model parameter in a unique way using its graphon

Usage

degreeSort(thetaInit, outTheta = TRUE, outPerm = FALSE)

Value

according to the values of outTheta and outPerm the function returns the sorted stochastic block model parameter or the associated permutation of the blocks of the stochastic block model or a list with both of them

Arguments

thetaInit

stochastic block model parameter to be sorted

outTheta

if TRUE returns the sorted stochastic block model parameter

outPerm

if TRUE returns the permutation of the blocks of the stochastic block model to provide the sorted stochastic block model parameter

Examples

Run this code
theta1 <- list(pi=c(.5,.5), gamma=matrix((1:4)/8,2,2))
degreeSort(theta1)
theta2 <- list(pi=c(.5,.5), gamma=matrix(4:1/8,2,2))
degreeSort(theta2)

Run the code above in your browser using DataLab