Note
This page is a draft and under revision.
Note
This function is not yet supported.
Computes top EigVecs eigenvalues and eigenvectors of the adjacency matrix representing a given undirected Graph.
Parameters:
A Snap.py undirected Graph.
Rank of eigenvalues and eigenvectors that should be outputted.
Eigenvalues.
Eigenvectors.
Return value:
For more info see: http://en.wikipedia.org/wiki/GetEigVec
The following example shows how to calculate the top 2 eigenvalues and eigenvectors for TUNGraph:
import snap
Graph = snap.GenRndGnm(snap.PUNGraph, 100, 1000)
Eigval = snap.TFlt()
Eigvec = snap.TFltV()
snap.GetEigVec(Graph, 2, Eigval, Eigvec)
print "Eigenvalue: ", Eigval.Val
print "Eigenvector: "
for i in Eigvec:
print i