GetSngVals(Graph, SngVals, SngValV)

Computes SngVals largest singular values of the adjacency matrix representing the directed graph Graph.


  • Graph: directed graph (input)

    A directed graph.

  • SngVals: int (input)

    The number of singular values to compute.

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

    The vector of singular values.

Return value:

  • None

The following example shows how to calculate singular values for TNGraph:

import snap

Graph = snap.GenRndGnm(snap.PNGraph, 100, 1000)
SngVals = 4
SngValV = snap.TFltV()
snap.GetSngVals(Graph, SngVals, SngValV)
for item in SngValV:
    print item

Previous topic


Next topic


This Page