(self, includeSubPaths=True, lanczosVecs = 15, maxiter = 20)
return _np.abs(evals2_sorted[1])
Returns the eigenvalue gap of the transition matrix.

        @param includeSubPaths: whether or not to include subpath statistics in the 
            calculation of transition probabilities.
Returns the eigenvalue gap of the transition matrix.
Returns the eigenvalue gap of the transition matrix .
def getEigenValueGap(self, includeSubPaths=True, lanczosVecs = 15, maxiter = 20):
        """
        Returns the eigenvalue gap of the transition matrix.

        @param includeSubPaths: whether or not to include subpath statistics in the 
            calculation of transition probabilities.
        """
    
        #NOTE to myself: most of the time goes for construction of the 2nd order
        #NOTE            null graph, then for the 2nd order null transition matrix   
    
        Log.add('Calculating eigenvalue gap ... ', Severity.INFO)

        # Build transition matrices
        T = self.getTransitionMatrix(includeSubPaths)
    
        # Compute the two largest eigenvalues
        # NOTE: ncv sets additional auxiliary eigenvectors that are computed
        # NOTE: in order to be more confident to actually find the one with the largest
        # NOTE: magnitude, see https://github.com/scipy/scipy/issues/4987
        w2 = _sla.eigs(T, which="LM", k=2, ncv=lanczosVecs, return_eigenvectors=False, maxiter = maxiter)
        evals2_sorted = _np.sort(-_np.absolute(w2))
        
        Log.add('finished.', Severity.INFO)
    
        return _np.abs(evals2_sorted[1])
def getEigenValueGap ( self , includeSubPaths = True , lanczosVecs = 15 , maxiter = 20 ) : #NOTE to myself: most of the time goes for construction of the 2nd order #NOTE            null graph, then for the 2nd order null transition matrix    Log . add ( 'Calculating eigenvalue gap ... ' , Severity . INFO ) # Build transition matrices T = self . getTransitionMatrix ( includeSubPaths ) # Compute the two largest eigenvalues # NOTE: ncv sets additional auxiliary eigenvectors that are computed # NOTE: in order to be more confident to actually find the one with the largest # NOTE: magnitude, see https://github.com/scipy/scipy/issues/4987 w2 = _sla . eigs ( T , which = "LM" , k = 2 , ncv = lanczosVecs , return_eigenvectors = False , maxiter = maxiter ) evals2_sorted = _np . sort ( - _np . absolute ( w2 ) ) Log . add ( 'finished.' , Severity . INFO ) return _np . abs ( evals2_sorted [ 1 ] )