crowmatrix.hpp
Go to the documentation of this file.
const int & ptr(int i) const
Returns a const reference to the to the internal pointer index data ptr of the matrix.
Definition: crowmatrix.hpp:301
double & set(int i, int j)
Function to get a reference to matrix element value at (i,j).
Definition: crowmatrix.hpp:397
int & ptr(int i)
Returns a reference to the to the internal pointer index data ptr of the matrix.
Definition: crowmatrix.hpp:286
void clear(void)
Clear non-zero matrix elements, set all elements to zero.
Definition: crowmatrix.cpp:360
void debug_print(std::ostream &os) const
Print debugging information to os.
Definition: crowmatrix.cpp:583
int nz_elements(void) const
Returns the number of non-zero elements in the matrix.
Definition: crowmatrix.hpp:169
bool check_ascending(void) const
Check if matrix data is in ascending column index order within each row.
Definition: crowmatrix.cpp:451
void lower_unit_solve(Vector &x, const Vector &b) const
Solves A*x = b for lower unit diagonal matrix.
Definition: crowmatrix.cpp:640
int rows(void) const
Returns the number of rows in the matrix.
Definition: crowmatrix.hpp:160
int & col(int i)
Returns a reference to the to the internal column data of the matrix.
Definition: crowmatrix.hpp:291
void order_ascending(void)
Order (sort) matrix data in ascending column index order within each row.
Definition: crowmatrix.cpp:443
void LU_solve(Vector &x, const Vector &b) const
Solves A*x = b for packed LU matrix.
Definition: crowmatrix.cpp:677
void resize(int n, int m)
Resizes the matrix to size n x m.
Definition: crowmatrix.cpp:334
void upper_diag_solve(Vector &x, const Vector &b) const
Solves A*x = b for upper diagonal matrix.
Definition: crowmatrix.cpp:657
int capacity(void) const
Returns the number of elements allocated for matrix.
Definition: crowmatrix.hpp:173
void set_nz(int nz)
Set number of non-zero elements in the matrix.
Definition: crowmatrix.cpp:415
const int & col(int i) const
Returns a const reference to the to the internal column data of the matrix.
Definition: crowmatrix.hpp:306
int columns(void) const
Returns the number of columns in the matrix.
Definition: crowmatrix.hpp:156
const double & val(int i) const
Returns a const reference to the to the internal value data of the matrix.
Definition: crowmatrix.hpp:311
CRowMatrix & operator=(const CRowMatrix &mat)
Assignment operator.
Definition: crowmatrix.cpp:184
void reserve(int size)
Reserve memory for size matrix elements.
Definition: crowmatrix.cpp:406
double get(int i, int j) const
Function to get a matrix element value at (i,j).
Definition: crowmatrix.hpp:387
void set_row(int i, int N, const int *col, const double *val)
Function to set matrix row elements.
Definition: crowmatrix.cpp:523
double & val(int i)
Returns a reference to the to the internal value data of the matrix.
Definition: crowmatrix.hpp:296
void construct_add(int i, int j, double val)
Adds an element to matrix while constructing the whole matrix.
Definition: crowmatrix.cpp:565
void size(int &n, int &m) const
Returns the number of columns and number of columns in nn and mm.
Definition: crowmatrix.hpp:165
void merge(CRowMatrix &mat)
Merges matrix mat into the matrix leaving mat empty.
Definition: crowmatrix.cpp:425
Error classes and handling
Basis for matrix implementations.