public static KamSummary summarizeKamNetwork ( Collection < KamEdge > edges , int statementCount ) { KamSummary summary = new KamSummary ( ) ; Set < KamNode > nodes = new HashSet < KamNode > ( ) ; //unique set of nodes for ( KamEdge edge : edges ) { nodes . add ( edge . getSourceNode ( ) ) ; nodes . add ( edge . getTargetNode ( ) ) ; } summary . setNumOfBELStatements ( statementCount ) ; summary . setNumOfNodes ( nodes . size ( ) ) ; summary . setNumOfEdges ( edges . size ( ) ) ; return summary ; }
Summarize nodes and edges