GetEigVec

Note

This page is a draft and under revision.

GetEigVec(Graph, EigVecs, EigValV, EigVecV)

Note

This function is not yet supported.

Computes top EigVecs eigenvalues and eigenvectors of the adjacency matrix representing a given undirected Graph.

Parameters:

  • Graph: graph (input)

    A Snap.py undirected Graph.

  • EigVecs: int (input)

    Rank of eigenvalues and eigenvectors that should be outputted.

  • EigValV: TFltV, a vector of floats (output)

    Eigenvalues.

  • EigVecV: TVec<TFltV> (output)

    Eigenvectors.

Return value:

  • None

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

Previous topic

GetEigVec

Next topic

GetSngVals

This Page