MatrixTools Namespace Reference

## Functions

template<class Matrix >
bool isSymmetric (const Matrix &matrix)
Checks if matrix is symmetric. More...

template<class Matrix >
bool isSDD (const Matrix &matrix)
Checks if matrix is symmetric diagonally dominant (SDD). More...

template<typename Matrix >
bool isLaplacian (const Matrix &matrix)
Checks if matrix is a Laplacian matrix. More...

template<class Matrix >
NetworKit::Graph laplacianToGraph (const Matrix &laplacian)
Computes a graph having the given laplacian. More...

template<class Matrix >
NetworKit::Graph matrixToGraph (const Matrix &matrix)
Interprets the matrix as adjacency matrix of a graph. More...

## Function Documentation

template<typename Matrix >
 bool MatrixTools::isLaplacian ( const Matrix & matrix )

Checks if matrix is a Laplacian matrix.

Parameters
 matrix
Returns
True if matrix is a Laplacian matrix, false otherwise.
template<class Matrix >
 bool MatrixTools::isSDD ( const Matrix & matrix )

Checks if matrix is symmetric diagonally dominant (SDD).

Parameters
 matrix
Returns
True if matrix is SDD, false otherwise.
template<class Matrix >
 bool MatrixTools::isSymmetric ( const Matrix & matrix )

Checks if matrix is symmetric.

Parameters
 matrix
Returns
True if matrix is symmetric, otherwise false.
template<class Matrix >
 NetworKit::Graph MatrixTools::laplacianToGraph ( const Matrix & laplacian )

Computes a graph having the given laplacian.

Parameters
 laplacian
Returns
The graph having a Laplacian equal to laplacian.
template<class Matrix >
 NetworKit::Graph MatrixTools::matrixToGraph ( const Matrix & matrix )

Interprets the matrix as adjacency matrix of a graph.

If matrix is non-symmetric, the graph will be directed.

Parameters
 matrix
Returns
The graph having an adjacency matrix equal to matrix.