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