This module deals with the conversion of graphs into matrices and linear algebra operations on graphs
Builds the PageRank matrix of the undirected Graph G. This matrix corresponds with the PageRank matrix used in the C++ backend.
G (networkit.Graph) – The graph.
damp (float, optional) – Damping factor of the PageRank algorithm. Default: 0.85
The N x N page rank matrix of graph.
ndarray
Compute a certain eigenvector and eigenvalue of the Adjacency matrix of G.
G (networkit.Graph) – The input graph.
i (int) – Computes the eigenvector and value of index i.
reverse (bool, optional) – If set to true, the smaller eigenvalues will be computed before the larger ones. Default: False
A pair of values, the first containing the eigenvalue, the second one holding the corresponding eigenvector
tuple( float, ndarray )
Computes eigenvectors and -values of the Adjacency matrix of G.
G (networkit.Graph) – The graph.
cutoff (int, optional) – The maximum (or minimum) number of eigenvectors needed. Default: -1
reverse (bool, optional) – If set to true, the smaller eigenvalues will be computed before the larger ones. Default: False
A tuple of ordered lists, the first containing the eigenvalues in descending (ascending) magnitude, the second one holding the corresponding eigenvectors
tuple(list(float), list(ndarray))
Get the adjacency matrix of the graph G.
G (networkit.Graph) – The graph.
matrixType (str, optional) – Either “sparse” or “dense”. Default: “sparse”
The adjacency matrix of the graph.
scipy.sparse.csr_matrix
Get the ith column of a matrix
matrix (scipy.sparse.csr_matrix
) – The matrix to compute the eigenvectors of.
i (int) – Column index.
Column i of matrix.
list(float)
Computes eigenvectors and -values of matrices.
matrix (scipy.sparse.csr_matrix
) – The matrix to compute the eigenvectors of.
cutoff (int, optional) – The maximum (or minimum) number of eigenvectors needed. Default: -1
reverse (bool, optional) – If set to true, the smaller eigenvalues will be computed before the larger ones. Default: False
A tuple of ordered lists, the first containing the eigenvalues in descending (ascending) magnitude, the second one holding the corresponding eigenvectors
tuple(list(float), list(ndarray))
Compute a certain eigenvector and -value of the Laplician matrix of G.
G (networkit.Graph) – The input graph.
i (int) – Computes the eigenvector and value of index i.
reverse (bool, optional) – If set to true, the smaller eigenvalues will be computed before the larger ones. Default: False
A pair of values, the first containing the eigenvalue, the second one holding the corresponding eigenvector
tuple(float, ndarray)
Computes eigenvectors and -values of the Laplician matrix of G.
G (networkit.Graph) – The input graph.
cutoff (int, optional) – The maximum (or minimum) number of eigenvectors needed. Default: -1
reverse (bool, optional) – If set to true, the smaller eigenvalues will be computed before the larger ones. Default: False
A tuple of ordered lists, the first containing the eigenvalues in descending (ascending) magnitude, the second one holding the corresponding eigenvectors
tuple(list(float), list(ndarray))
Get the laplacian matrix of the graph G.
G (networkit.Graph) – The graph.
scipy.sparse.csr_matrix
The N x N laplacian matrix of csgraph. It will be a scipy.sparse.csr_matrix.
Computes eigenvectors and -values of symmetric matrices.
matrix (scipy.sparse.csr_matrix
) – The matrix to compute the eigenvectors of.
cutoff (int, optional) – The maximum (or minimum) magnitude of the eigenvectors needed. Default: -1
reverse (boolean, optional) – If set to true, the smaller eigenvalues will be computed before the larger ones. Default: False
A tuple of ordered lists, the first containing the eigenvalues in descending (ascending) magnitude, the second one holding the corresponding eigenvectors.
tuple(list(float), list(ndarray))