Learn R Programming

DynComm (version 2020.1.6)

vertexCount: vertexCount()

Description

Get the total number of vertices from the selected post processing algorithm or the main algorithm, after the last iteration.

Usage

DynComm.vertexCount(dyncomm)
DynComm.nodesCount(dyncomm)

Arguments

dyncomm

A DynComm object, if not using the inline version of the function call

Value

an unsigned integer with the number of vertices in the graph

Details

It can be useful since vertices can be added, if an edge being added has vertices that do not exist in the graph, or removed, if they are not part of any edge after removing an edge.

See Also

DynComm , postProcess

Examples

Run this code
# NOT RUN {
library(DynComm)

Parameters<-matrix(c("e","0.1","w", "FALSE"),ncol=2, byrow=TRUE)
dc<-DynComm(ALGORITHM$LOUVAIN,CRITERION$MODULARITY,Parameters)
dc$addRemoveEdges(
 matrix(
   c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,12,13,1,1,1,2,2,2,18,12,19,20,2,3,11,12,4,9,5,9,22)
      ,ncol=2)
)

dc$communities()
dc$communityVertexCount(12)

# }

Run the code above in your browser using DataLab