#include <AbstractLinAlgPack_COOMatrixClass.hpp>
{\bf Public Typedefs} | |
| typedef AbstractLinAlgPack::size_type | size_type |
| | |
| typedef AbstractLinAlgPack::indice_type | indice_type |
| | |
| typedef AbstractLinAlgPack::value_type | value_type |
| | |
Constructors. | |
| The default copy constructor is used since it has the correct implementation (memberwise assignment and not binary copy). In the default copy constructor, initially these objects will share memory for ivect#, jvect#. Initially only val# is allocated and made unique. If the sparsity information of the matrix does not change then the value of the nonzero elements can be changed without further allocations. If however, the row and/or column access in changed, or ivect or jvect is changed then new allocations will be performed. | |
| COOMatrix () | |
| Consturct with no storage allocated. | |
COO matrix representation access. | |
| These member functions give access the the val#, ivect# and jvect# arrays used to store the underlying nonzero elements of the full matrix.
Since sharing can be used between COOMatrix objects the client should call the 'const_' functions if they are only going to be reading these data since if the others are called on a nonconst object then if ivect# or jvect# is being shared then a freash copy would be made unnecesarily. | |
| value_type * | val () |
| Return pointer to raw storage array (length nz()#) for the values of the non-zero elements. | |
| const value_type * | val () const |
| | |
| const value_type * | const_val () const |
| | |
| indice_type * | ivect () |
| Return pointer to raw storage array (length nz()#) for the row indices of the non-zero elements. | |
| const indice_type * | ivect () const |
| | |
| const indice_type * | const_ivect () const |
| | |
| indice_type * | jvect () |
| Return pointer to raw storage array (length nz()#) for the column indices of the non-zero elements. | |
| const indice_type * | jvect () const |
| | |
| const indice_type * | const_jvect () const |
| | |
| void | initialize (std::istream &istrm) |
| Initialize from an input stream. | |
Public Member Functions | |
| COOMatrix & | operator= (const COOMatrix &coom) |
| Assignment operator. | |
| void | resize (size_type rows, size_type cols, size_type nz) |
| Resize for a rows# by cols# sparse matrix with nz# elements. | |
| size_type | rows () const |
| Return the number of rows in the row access view. | |
| size_type | cols () const |
| Returns the number of columns in the column access view. | |
| size_type | nz () const |
This class abstracts a fortran style sparse coordinate matrix which is stored is three vectors: (val, ivect, jvect). This class allows direct access to these arrays for integration with fortran function calls.
The row and column indices represented by this class must be 1-based.
Definition at line 48 of file AbstractLinAlgPack_COOMatrixClass.hpp.
| typedef AbstractLinAlgPack::indice_type AbstractLinAlgPack::COOMatrix::indice_type |
| AbstractLinAlgPack::COOMatrix::COOMatrix | ( | ) | [inline] |
Consturct with no storage allocated.
Definition at line 185 of file AbstractLinAlgPack_COOMatrixClass.hpp.
Assignment operator.
This function has similar behavior w.r.t sharing that the copy constructor has accept any current storage will be deallocated.
| COOMatrix::size_type AbstractLinAlgPack::COOMatrix::rows | ( | ) | const [inline] |
Return the number of rows in the row access view.
Definition at line 188 of file AbstractLinAlgPack_COOMatrixClass.hpp.
| COOMatrix::size_type AbstractLinAlgPack::COOMatrix::cols | ( | ) | const [inline] |
Returns the number of columns in the column access view.
Definition at line 191 of file AbstractLinAlgPack_COOMatrixClass.hpp.
| COOMatrix::value_type * AbstractLinAlgPack::COOMatrix::val | ( | ) | [inline] |
Return pointer to raw storage array (length nz()#) for the values of the non-zero elements.
Definition at line 198 of file AbstractLinAlgPack_COOMatrixClass.hpp.
| const COOMatrix::value_type * AbstractLinAlgPack::COOMatrix::val | ( | ) | const [inline] |
| const COOMatrix::value_type * AbstractLinAlgPack::COOMatrix::const_val | ( | ) | const [inline] |
| COOMatrix::indice_type * AbstractLinAlgPack::COOMatrix::ivect | ( | ) | [inline] |
Return pointer to raw storage array (length nz()#) for the row indices of the non-zero elements.
Definition at line 207 of file AbstractLinAlgPack_COOMatrixClass.hpp.
| const COOMatrix::indice_type * AbstractLinAlgPack::COOMatrix::ivect | ( | ) | const [inline] |
| const COOMatrix::indice_type * AbstractLinAlgPack::COOMatrix::const_ivect | ( | ) | const [inline] |
| COOMatrix::indice_type * AbstractLinAlgPack::COOMatrix::jvect | ( | ) | [inline] |
Return pointer to raw storage array (length nz()#) for the column indices of the non-zero elements.
Definition at line 216 of file AbstractLinAlgPack_COOMatrixClass.hpp.
| const COOMatrix::indice_type * AbstractLinAlgPack::COOMatrix::jvect | ( | ) | const [inline] |
| const COOMatrix::indice_type * AbstractLinAlgPack::COOMatrix::const_jvect | ( | ) | const [inline] |
| void AbstractLinAlgPack::COOMatrix::initialize | ( | std::istream & | istrm | ) |
Initialize from an input stream.
The format for the imput is:
m n nz#\ a1:i1:j1 a2:i2:j2 .... anz:inz:jnz#\
In the above format, each non-zero element is given as a three item pair: value of the non-zero element, row indice (1-based) of the non-zero element, and the column indice (1-based) of the non-zero element. There must be no spaces between the numbers and the \':\' charachter and there must be at least one whitespace character between elements.
1.4.7