#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. | |
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.
|
|
Definition at line 59 of file AbstractLinAlgPack_COOMatrixClass.hpp. |
|
|
Definition at line 61 of file AbstractLinAlgPack_COOMatrixClass.hpp. |
|
|
Definition at line 63 of file AbstractLinAlgPack_COOMatrixClass.hpp. |
|
|
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. Definition at line 45 of file AbstractLinAlgPack_COOMatrixClass.cpp. |
|
||||||||||||||||
|
Resize for a rows# by cols# sparse matrix with #nz# elements. Any sharing if row or column indices is lost. Definition at line 62 of file AbstractLinAlgPack_COOMatrixClass.cpp. |
|
|
Return the number of rows in the row access view.
Definition at line 188 of file AbstractLinAlgPack_COOMatrixClass.hpp. |
|
|
Returns the number of columns in the column access view.
Definition at line 191 of file AbstractLinAlgPack_COOMatrixClass.hpp. |
|
|
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. |
|
|
Definition at line 201 of file AbstractLinAlgPack_COOMatrixClass.hpp. |
|
|
Definition at line 204 of file AbstractLinAlgPack_COOMatrixClass.hpp. |
|
|
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. |
|
|
Definition at line 210 of file AbstractLinAlgPack_COOMatrixClass.hpp. |
|
|
Definition at line 213 of file AbstractLinAlgPack_COOMatrixClass.hpp. |
|
|
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. |
|
|
Definition at line 219 of file AbstractLinAlgPack_COOMatrixClass.hpp. |
|
|
Definition at line 222 of file AbstractLinAlgPack_COOMatrixClass.hpp. |
|
|
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. Definition at line 75 of file AbstractLinAlgPack_COOMatrixClass.cpp. |
1.3.9.1