Grid Interpolation
Public Member Functions | Private Attributes | List of all members
GRID_INTERP::GridValues Class Reference

This is a container class for the values. More...

#include <gridInterp.h>

Public Member Functions

 GridValues ()
 Empty constructor. More...
 
double operator() (int l, int r, int c) const
 Access operator in 3D. More...
 
double operator() (int r, int c) const
 Access operator in 2D. More...
 
double operator() (int c) const
 Access operator in 1D. More...
 
void resize (int nl, int nr, int nc)
 
void set (int l, int r, int c, double v_in)
 
void reset ()
 
int nx () const
 returns the number of columns or values in the x direction More...
 
int ny () const
 returns the number of rows or values in the y direction More...
 
int nz () const
 returns the number of layers or values in the z direction More...
 

Private Attributes

std::vector< std::vector< std::vector< double > > > v
 

Detailed Description

This is a container class for the values.

When this object is constructed is empty. To start filling it with values it has to be first resized using the resize(int nl, int nr, int nc) method.
After the class is resized, it can be filled with values using the set(int l, int r, int c, double v_in) method

Constructor & Destructor Documentation

◆ GridValues()

GRID_INTERP::GridValues::GridValues ( )
inline

Empty constructor.

Member Function Documentation

◆ nx()

int GRID_INTERP::GridValues::nx ( ) const

returns the number of columns or values in the x direction

◆ ny()

int GRID_INTERP::GridValues::ny ( ) const

returns the number of rows or values in the y direction

◆ nz()

int GRID_INTERP::GridValues::nz ( ) const

returns the number of layers or values in the z direction

◆ operator()() [1/3]

double GRID_INTERP::GridValues::operator() ( int  l,
int  r,
int  c 
) const

Access operator in 3D.

◆ operator()() [2/3]

double GRID_INTERP::GridValues::operator() ( int  r,
int  c 
) const

Access operator in 2D.

◆ operator()() [3/3]

double GRID_INTERP::GridValues::operator() ( int  c) const

Access operator in 1D.

◆ reset()

void GRID_INTERP::GridValues::reset ( )

Deletes the data of the object bringing it at the state to receive new data. However after reset it has to ne resized first.

◆ resize()

void GRID_INTERP::GridValues::resize ( int  nl,
int  nr,
int  nc 
)

Resize the data array.
Unlike the usual usage of resize function in vector the resize will discard any existing data first

◆ set()

void GRID_INTERP::GridValues::set ( int  l,
int  r,
int  c,
double  v_in 
)

Member Data Documentation

◆ v

std::vector<std::vector<std::vector<double> > > GRID_INTERP::GridValues::v
private

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