Cantera  2.1.2
DoubleStarStar Class Reference

A class for 2D double arrays stored in column-major (Fortran-compatible) form. More...

#include <vcs_DoubleStarStar.h>

## Public Member Functions

DoubleStarStar ()
Default constructor. Create an empty array. More...

DoubleStarStar (size_t mcol, size_t nrow, double v=0.0)
Constructor. More...

DoubleStarStar (const DoubleStarStar &y)

DoubleStarStaroperator= (const DoubleStarStar &y)

void resize (size_t mcol, size_t nrow, double v=0.0)
Resize the array, and fill the new entries with v More...

double * operator[] (size_t jcol)
Pointer to the top of the column. More...

const double * operator[] (size_t jcol) const
Returns a const Pointer to the top of the jth column. More...

Returns a double** pointer to the base address. More...

double const *const * constBaseDataAddr () const
Returns a const double** pointer to the base address. More...

size_t nRows () const
Number of rows. More...

size_t nColumns () const
Number of columns. More...

## Private Attributes

std::vector< double > m_data
Storage area. More...

Vector of addresses for the top of the columns. More...

size_t m_nrows
number of rows More...

size_t m_ncols
number of columns More...

## Detailed Description

A class for 2D double arrays stored in column-major (Fortran-compatible) form.

In this form, the data entry for an n row, m colum matrix is index = i + (n-1) * j where Matrix[j][i] references the element in row i, column j.

The way this is instantiated is via the constructor, DoubleStarStar Dmatrix(mcol, mrow).

The way this is referenced is via the notation: Dmatrix[icol][irow].

Definition at line 28 of file vcs_DoubleStarStar.h.

## Constructor & Destructor Documentation

 DoubleStarStar ( )

Default constructor. Create an empty array.

Definition at line 11 of file vcs_DoubleStarStar.cpp.

 DoubleStarStar ( size_t mcol, size_t nrow, double v = 0.0 )

Constructor.

Create an nrow by mcol double array, and initialize all elements to v.

Parameters
 mcol Number of columns nrow Number of rows v value used to initialize elements

Definition at line 19 of file vcs_DoubleStarStar.cpp.

## Member Function Documentation

 void resize ( size_t mcol, size_t nrow, double v = 0.0 )

Resize the array, and fill the new entries with v

Parameters
 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.

Definition at line 63 of file vcs_DoubleStarStar.cpp.

Referenced by VCS_PROB::resizeElements(), VCS_PROB::resizeSpecies(), and VCS_PROB::VCS_PROB().

 double * operator[] ( size_t jcol )

Pointer to the top of the column.

Parameters
 jcol This is the jth column
Returns
returns the pointer to the top of the jth column

Definition at line 108 of file vcs_DoubleStarStar.cpp.

 const double * operator[] ( size_t jcol ) const

Returns a const Pointer to the top of the jth column.

Parameters
 jcol This is the jth column
Returns
returns the pointer to the top of the jth column

Definition at line 113 of file vcs_DoubleStarStar.cpp.

 double *const * baseDataAddr ( )

Returns a double** pointer to the base address.

This is the second way to get to the data. This returns a double** which can later be used in Dmatrix[icol][irow] notation to get to the data.

Definition at line 118 of file vcs_DoubleStarStar.cpp.

Referenced by VCS_PROB::set_gai(), and VCS_SOLVE::vcs_CalcLnActCoeffJac().

 double const *const * constBaseDataAddr ( ) const

Returns a const double** pointer to the base address.

This is the second way to get to the data This returns a double ** which can later be used in Dmatrix[icol][irow]` notation to get to the data.

Definition at line 123 of file vcs_DoubleStarStar.cpp.

 size_t nRows ( ) const

Number of rows.

Definition at line 128 of file vcs_DoubleStarStar.cpp.

References DoubleStarStar::m_nrows.

 size_t nColumns ( ) const

Number of columns.

Definition at line 133 of file vcs_DoubleStarStar.cpp.

References DoubleStarStar::m_ncols.

## Member Data Documentation

 std::vector m_data
private

Storage area.

Definition at line 97 of file vcs_DoubleStarStar.h.

Referenced by DoubleStarStar::DoubleStarStar(), and DoubleStarStar::resize().

private

Vector of addresses for the top of the columns.

Length = mcol

Definition at line 103 of file vcs_DoubleStarStar.h.

 size_t m_nrows
private

number of rows

Definition at line 106 of file vcs_DoubleStarStar.h.

Referenced by DoubleStarStar::DoubleStarStar(), DoubleStarStar::nRows(), and DoubleStarStar::resize().

 size_t m_ncols
private

number of columns

Definition at line 109 of file vcs_DoubleStarStar.h.

The documentation for this class was generated from the following files: