예제 #1
0
 def calculate(graph):
     if nx.is_connected(graph):
         return bool(
             Utils.approx_to_int(
                 la.det(inv_other.DistanceMatrix.calculate(graph))) != 0)
     else:
         return False
예제 #2
0
 def calculate(graph):
     if nx.is_connected(graph):
         return Utils.approx_to_int(
             la.det(
                 inv_other.SignlessLaplacianDistanceMatrix.calculate(
                     graph)))
     else:
         return 10**10
예제 #3
0
 def calculate(graph):
     return Utils.approx_to_int(nx.estrada_index(graph))
예제 #4
0
 def calculate(graph):
     if nx.is_connected(graph):
         return Utils.approx_to_int(nx.wiener_index(graph))
     else:
         return 10**10
예제 #5
0
 def calculate(graph):
     if nx.number_of_nodes(graph) > 1:
         return Utils.approx_to_int(
             inv_other.LaplacianSpectrum.calculate(graph)[1])
     else:
         return 0
예제 #6
0
 def calculate(graph):
     return Utils.approx_to_int(
         la.det(inv_other.NormalizedLaplacianMatrix.calculate(graph)))
예제 #7
0
 def calculate(graph):
     return Utils.approx_to_int(
         la.det(inv_other.SeidelMatrix.calculate(graph)))
예제 #8
0
 def calculate(graph):
     return Utils.approx_to_int(
         la.det(inv_other.SignlessLaplacianMatrix.calculate(graph)))
예제 #9
0
 def calculate(graph):
     return Utils.approx_to_int(
         la.det(inv_other.AdjacencyMatrix.calculate(graph)))
예제 #10
0
 def calculate(graph):
     return bool(
         Utils.approx_to_int(
             la.det(inv_other.LaplacianMatrix.calculate(graph))) != 0)