#include <matrix.h>
Public Member Functions | |
double & | val (unsigned int row, unsigned int col) |
the value of a cell of the matrix | |
const double & | val (unsigned int row, unsigned int col) const |
read-only access to the values of a matrix cell | |
unsigned int | dim () const |
get the dimension of the matrix | |
void | changeDimension (const unsigned int dimension) |
Reset matrix to new dimension. | |
void | add (const Matrix *m) |
Adds the matrix to the current matrix. | |
void | subtract (const Matrix *m) |
Subtracts a matrix from the current matrix. | |
auto_array< double > | band (int &n, int &nsdiag) const |
Returns the matrix in bandfrom which is needed for arpack++. | |
int | split (Matrix &a, Matrix &b, std::vector< unsigned int > &indexMap, std::list< unsigned int > &indices) const |
Splits the matrix into two new matrices. | |
Matrix & | inject (const Matrix &m, unsigned int index) |
Injects a small matrix into a larger one at an arbitrary position. | |
void | transform (double *vec) const |
Transforms a vector. | |
void | diag (const double *diag, unsigned int dim) |
Resets the matrix to have diag with dimension dim on its diagonal. | |
Matrix & | operator= (double val) |
Sets all elements in the matrix to the given value val . | |
Matrix & | operator+= (const Matrix &operand) |
Convience function for add(). | |
Matrix & | operator-= (const Matrix &operand) |
Convience function for subtract(). | |
Matrix (unsigned int dimension=0) | |
Creates an empty matrix with the given dimension. | |
Matrix (const double *diag, unsigned int dim) | |
Create a new diagonal matrix. | |
Matrix (const Matrix &clone) | |
Matrix copy constructor. | |
virtual | ~Matrix () |
Matrix destructor. | |
virtual Matrix & | operator= (const Matrix &clone) |
Matrix assignment operator. | |
Protected Attributes | |
double ** | value_ |
unsigned int | dimension_ |
Matrix
is a simple quadratic matrix class containing all operations needed by the ncut library.
|
Creates an empty matrix with the given dimension.
|
|
Create a new diagonal matrix.
dim with diag on its diagonal |
|
Matrix copy constructor.
|
|
Adds the matrix to the current matrix.
|
|
Returns the matrix in bandfrom which is needed for arpack++.
|
|
Reset matrix to new dimension.
|
|
Resets the matrix to have diag with dimension dim on its diagonal.
|
|
get the dimension of the matrix
|
|
Injects a small matrix into a larger one at an arbitrary position.
Matrix m is copied into this Matrix starting at position (index , index ). m does not have to fit inside this matrix, but if it doesn't, only the values of m that do fit are copied. All values in this matrix remain unchanged except the ones overwritten by m . |
|
Convience function for add().
|
|
Convience function for subtract().
|
|
Matrix assignment operator.
|
|
Sets all elements in the matrix to the given value
|
|
Splits the matrix into two new matrices.
|
|
Subtracts a matrix from the current matrix.
|
|
Transforms a vector.
|
|
read-only access to the values of a matrix cell
|
|
the value of a cell of the matrix
|
|
The dimension of the matrix |
|
All elements in the matrix |