GetEigVals¶
-
GetEigVals
(EigVals)¶
A graph method that computes top EigVals eigenvalues of the adjacency matrix representing the given undirected graph.
Parameters:
- EigVals: int
The number of eigenvalues.
Return value:
TFltV
, a vector of floatsThe eigenvector of floating point values.
The following example shows how to calcualte the top EigVals eigenvalues for TUNGraph
:
import snap
UGraph = snap.GenRndGnm(snap.TUNGraph, 100, 1000)
EigVals = 5
PEigV = UGraph.GetEigVals(EigVals)
for item in PEigV:
print(item)