(self)
return self._modularity
Recalculates the stored modularity value.

        This method must be called before querying the modularity score of the
        clustering through the class member C{modularity} or C{q} if the
        graph has been modified (edges have been added or removed) since the
        creation of the L{VertexClustering} object.

        @return: the new modularity score
Recalculates the stored modularity value.
Recalculates the stored modularity value .
def recalculate_modularity(self):
        """Recalculates the stored modularity value.

        This method must be called before querying the modularity score of the
        clustering through the class member C{modularity} or C{q} if the
        graph has been modified (edges have been added or removed) since the
        creation of the L{VertexClustering} object.

        @return: the new modularity score
        """
        self._modularity = self._graph.modularity(
            self._membership, **self._modularity_params
        )
        self._modularity_dirty = False
        return self._modularity
def recalculate_modularity ( self ) : self . _modularity = self . _graph . modularity ( self . _membership , * * self . _modularity_params ) self . _modularity_dirty = False return self . _modularity