|
Cantera
2.0
|
A class for 2D int arrays stored in column-major (Fortran-compatible) form. More...
#include <vcs_IntStarStar.h>
Public Member Functions | |
| IntStarStar () | |
| Default constructor. Create an empty array. | |
| IntStarStar (size_t mcol, size_t nrow, int v=0) | |
| Constructor. | |
| IntStarStar (const IntStarStar &y) | |
| Copy constructor. | |
| IntStarStar & | operator= (const IntStarStar &y) |
| Assignment operator. | |
| void | resize (size_t mcol, size_t nrow, int v=0) |
| Resize the array, and fill the new entries with 'v'. | |
| int * | operator[] (size_t jcol) |
| Pointer to the top of the column. | |
| const int * | operator[] (size_t jcol) const |
| Pointer to the top of the column. | |
| int *const * | baseDataAddr () |
| Returns a int ** pointer to the base address. | |
| size_t | nRows () const |
| Number of rows. | |
| size_t | nColumns () const |
| Number of columns. | |
Private Attributes | |
| std::vector< int > | m_data |
| Storage area for the matrix, layed out in Fortran style, row-inner, column outer format. | |
| std::vector< int * > | m_colAddr |
| Vector of column addresses. | |
| size_t | m_nrows |
| number of rows | |
| size_t | m_ncols |
| number of columns | |
A class for 2D int arrays stored in column-major (Fortran-compatible) form.
In this form, the data entry for an n row, m col matrix is index = i + (n-1) * j where Matrix[j][i] i = row j = column
Definition at line 26 of file vcs_IntStarStar.h.
| IntStarStar | ( | ) |
Default constructor. Create an empty array.
Definition at line 12 of file vcs_IntStarStar.cpp.
References IntStarStar::m_colAddr, and IntStarStar::m_data.
| IntStarStar | ( | size_t | mcol, |
| size_t | nrow, | ||
| int | v = 0 |
||
| ) |
Constructor.
Create an nrow by mcol int array, and initialize all elements to v.
| mcol | Number of columns |
| nrow | Number of rows |
Definition at line 24 of file vcs_IntStarStar.cpp.
References IntStarStar::m_colAddr, IntStarStar::m_data, IntStarStar::m_ncols, and IntStarStar::m_nrows.
| IntStarStar | ( | const IntStarStar & | y | ) |
Copy constructor.
| y | Object to be copied |
Definition at line 39 of file vcs_IntStarStar.cpp.
References IntStarStar::m_colAddr, IntStarStar::m_data, IntStarStar::m_ncols, and IntStarStar::m_nrows.
| IntStarStar & operator= | ( | const IntStarStar & | y | ) |
Assignment operator.
| y | Object to be copied |
Definition at line 54 of file vcs_IntStarStar.cpp.
References IntStarStar::m_colAddr, IntStarStar::m_data, IntStarStar::m_ncols, and IntStarStar::m_nrows.
| void resize | ( | size_t | m, |
| size_t | n, | ||
| int | v = 0 |
||
| ) |
Resize the array, and fill the new entries with 'v'.
resize the array, and fill the new entries with 'v'
| mcol | This is the number of columns in the new matrix |
| nrow | This is the number of rows |
| v | Default fill value -> defaults to zero. |
| n | This is the number of rows |
| m | This is the number of columns in the new matrix |
| v | Default fill value -> defaults to zero. |
Definition at line 79 of file vcs_IntStarStar.cpp.
References IntStarStar::m_colAddr, IntStarStar::m_data, IntStarStar::m_ncols, and IntStarStar::m_nrows.
Referenced by VCS_SOLVE::vcs_initSizes().
| int * operator[] | ( | size_t | jcol | ) |
Pointer to the top of the column.
| jcol | Pointer to the top of the jth column |
Definition at line 122 of file vcs_IntStarStar.cpp.
References IntStarStar::m_colAddr.
| const int * operator[] | ( | size_t | jcol | ) | const |
Pointer to the top of the column.
| j | Pointer to the top of the jth column |
Definition at line 127 of file vcs_IntStarStar.cpp.
References IntStarStar::m_colAddr.
| int *const * baseDataAddr | ( | ) |
Returns a int ** pointer to the base address.
This is the second way to get to the data This returns a int ** which can later be used in Imatrix[icol][irow] notation to get to the data
Definition at line 132 of file vcs_IntStarStar.cpp.
References IntStarStar::m_colAddr.
| size_t nRows | ( | ) | const |
Number of rows.
Definition at line 138 of file vcs_IntStarStar.cpp.
References IntStarStar::m_nrows.
| size_t nColumns | ( | ) | const |
Number of columns.
Definition at line 144 of file vcs_IntStarStar.cpp.
References IntStarStar::m_ncols.
|
private |
Storage area for the matrix, layed out in Fortran style, row-inner, column outer format.
Length = m_nrows * m_ncols
Definition at line 95 of file vcs_IntStarStar.h.
Referenced by IntStarStar::IntStarStar(), IntStarStar::operator=(), and IntStarStar::resize().
|
private |
Vector of column addresses.
Length = number of columns = m_ncols
Definition at line 101 of file vcs_IntStarStar.h.
Referenced by IntStarStar::baseDataAddr(), IntStarStar::IntStarStar(), IntStarStar::operator=(), IntStarStar::operator[](), and IntStarStar::resize().
|
private |
number of rows
Definition at line 104 of file vcs_IntStarStar.h.
Referenced by IntStarStar::IntStarStar(), IntStarStar::nRows(), IntStarStar::operator=(), and IntStarStar::resize().
|
private |
number of columns
Definition at line 107 of file vcs_IntStarStar.h.
Referenced by IntStarStar::IntStarStar(), IntStarStar::nColumns(), IntStarStar::operator=(), and IntStarStar::resize().
1.8.2