GetEigVals(Graph, EigVals, PEigV)

Computes top EigVals eigenvalues of the adjacency matrix representing the given undirected graph Graph.


  • Graph: undirected graph (input)

    An undirected graph.

  • EigVals: int (input)

    The number of eigenvalues.

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

    The eigenvector of floating point values.

Return value:

  • None

The following example shows how to calcualte the top EigVals eigenvalues for TUNGraph:

import snap

UGraph = snap.GenRndGnm(snap.PUNGraph, 100, 1000)
EigVals = 5
PEigV = snap.TFltV()
snap.GetEigVals(UGraph, EigVals, PEigV)
for item in PEigV:
    print item

Previous topic

Eigen and Singular Value Decomposition

Next topic


This Page