File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -875,6 +875,19 @@ def num_top_modules(self):
875875 """
876876 return super ().numTopModules ()
877877
878+ @property
879+ def num_non_trivial_top_modules (self ):
880+ """Get the number of non-trivial top modules in the tree
881+
882+ A trivial module is a module with either one or all nodes within.
883+
884+ Returns
885+ -------
886+ int
887+ The number of non-trivial top modules
888+ """
889+ return super ().numNonTrivialTopModules ()
890+
878891 @property
879892 def num_leaf_modules (self ):
880893 """Get the number of leaf modules in the tree
Original file line number Diff line number Diff line change @@ -604,6 +604,7 @@ InfomapBase& InfomapBase::initTree(const NodePaths& tree)
604604
605605 aggregateFlowValuesFromLeafToRoot ();
606606 initNetwork ();
607+ calculateNumNonTrivialTopModules ();
607608
608609 m_hierarchicalCodelength = calcCodelengthOnTree (true );
609610 Log () << " \n -> Initiated to codelength " << m_hierarchicalCodelength << " in " << maxDepth << " levels with " << numTopModules () << " top modules." << std::endl;
You can’t perform that action at this time.
0 commit comments