MI - Fimex
Public Member Functions | List of all members
MetNoFimex::CachedInterpolation Class Reference

#include <CachedInterpolation.h>

Inheritance diagram for MetNoFimex::CachedInterpolation:
MetNoFimex::CachedInterpolationInterface

Public Member Functions

 CachedInterpolation (std::string xDimName, std::string yDimName, int funcType, std::vector< double > pointsOnXAxis, std::vector< double > pointsOnYAxis, size_t inX, size_t inY, size_t outX, size_t outY)
 
virtual ~CachedInterpolation ()
 
virtual boost::shared_array< float > interpolateValues (boost::shared_array< float > inData, size_t size, size_t &newSize) const
 
virtual size_t getInX () const
 
virtual size_t getInY () const
 
virtual size_t getOutX () const
 
virtual size_t getOutY () const
 
virtual boost::shared_ptr< ReducedInterpolationDomainreducedDomain () const
 
void createReducedDomain (std::string xDimName, std::string yDimName)
 
- Public Member Functions inherited from MetNoFimex::CachedInterpolationInterface
 CachedInterpolationInterface (std::string xDimName, std::string yDimName)
 
virtual ~CachedInterpolationInterface ()
 
virtual boost::shared_ptr< DatagetInputDataSlice (boost::shared_ptr< CDMReader > reader, const std::string &varName, size_t unLimDim) const
 
virtual boost::shared_ptr< DatagetInputDataSlice (boost::shared_ptr< CDMReader > reader, const std::string &varName, const SliceBuilder &sb) const
 

Detailed Description

Container to cache projection details to speed up interpolation of lots of fields.

Constructor & Destructor Documentation

MetNoFimex::CachedInterpolation::CachedInterpolation ( std::string  xDimName,
std::string  yDimName,
int  funcType,
std::vector< double >  pointsOnXAxis,
std::vector< double >  pointsOnYAxis,
size_t  inX,
size_t  inY,
size_t  outX,
size_t  outY 
)
Parameters
funcTypeinterpolation.h interpolation method
pointsOnXAxisprojected values of the new projections coordinates expressed in the current x-coordinate (size = outX*outY)
pointsOnYAxisprojected values of the new projections coordinates expressed in the current y-coordinate (size = outX*outY)
inXsize of current X axis
inYsize of current Y axis
outXsize of new X axis
outYsize of new Y axis
virtual MetNoFimex::CachedInterpolation::~CachedInterpolation ( )
inlinevirtual

Member Function Documentation

void MetNoFimex::CachedInterpolation::createReducedDomain ( std::string  xDimName,
std::string  yDimName 
)

Create a reduced domain for later generation of a slicebuild to read a smaller domain. It should be run immediately after creating the CachedInterpolation.

virtual size_t MetNoFimex::CachedInterpolation::getInX ( ) const
inlinevirtual
Returns
x-size of the input data

Implements MetNoFimex::CachedInterpolationInterface.

virtual size_t MetNoFimex::CachedInterpolation::getInY ( ) const
inlinevirtual
Returns
y-size of the input data

Implements MetNoFimex::CachedInterpolationInterface.

virtual size_t MetNoFimex::CachedInterpolation::getOutX ( ) const
inlinevirtual
Returns
x-size of the output data

Implements MetNoFimex::CachedInterpolationInterface.

virtual size_t MetNoFimex::CachedInterpolation::getOutY ( ) const
inlinevirtual
Returns
y-size of the output data

Implements MetNoFimex::CachedInterpolationInterface.

virtual boost::shared_array<float> MetNoFimex::CachedInterpolation::interpolateValues ( boost::shared_array< float >  inData,
size_t  size,
size_t &  newSize 
) const
virtual

Actually interpolate the data. The data will be interpolated as floats internally.

Parameters
inDatathe input data
sizethe size of the input data array
newSizereturn the size of the output-array

Implements MetNoFimex::CachedInterpolationInterface.

virtual boost::shared_ptr<ReducedInterpolationDomain> MetNoFimex::CachedInterpolation::reducedDomain ( ) const
inlinevirtual

allow fetching of a reduced interpolation domain, i.e. to work with a much smaller amount of input data

Returns
a 0-pointer unless a internal function to reduce the domain has been run, e.g. CachedInterpolation::createReducedDomain()

Reimplemented from MetNoFimex::CachedInterpolationInterface.


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