DP3
Public Member Functions | List of all members
dp3::parmdb::AxisMapping Class Reference

Map the cells of one axis to another. More...

#include <AxisMapping.h>

Public Member Functions

 AxisMapping (const Axis &from, const Axis &to)
 Create the mapping. More...
 
const std::vector< int > & getBorders () const
 
const double * getScaledCenters () const
 
int operator[] (int i) const
 Get the to interval for the i-th from interval. More...
 
size_t size () const
 Get the number of elements. More...
 
typedef std::vector< int >::const_iterator const_iterator
 
const_iterator begin () const
 
const_iterator end () const
 

Detailed Description

Map the cells of one axis to another.

This class defines the mapping of one axis to another. It is meant for mapping the grid axes of a predict to the axes of the domain grid, so it has to be calculated only once per predict.

Member Typedef Documentation

◆ const_iterator

Iterator to get the next interval.

Constructor & Destructor Documentation

◆ AxisMapping()

dp3::parmdb::AxisMapping::AxisMapping ( const Axis from,
const Axis to 
)

Create the mapping.

Member Function Documentation

◆ begin()

const_iterator dp3::parmdb::AxisMapping::begin ( ) const
inline

◆ end()

const_iterator dp3::parmdb::AxisMapping::end ( ) const
inline

◆ getBorders()

const std::vector<int>& dp3::parmdb::AxisMapping::getBorders ( ) const
inline

Get the borders telling which from-cells map to the same to-cell. For example: borders (5,8,12) mean that from-cells 0-4 map to the same to-cell, and so do from-cells 5-7 and 8-11.

◆ getScaledCenters()

const double* dp3::parmdb::AxisMapping::getScaledCenters ( ) const
inline

Get a pointer to the scaled center values. The center value of each interval in the from axis is scaled for its interval in the to axis.

◆ operator[]()

int dp3::parmdb::AxisMapping::operator[] ( int  i) const
inline

Get the to interval for the i-th from interval.

◆ size()

size_t dp3::parmdb::AxisMapping::size ( ) const
inline

Get the number of elements.


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