SynAPSE  0.6.0
Synergistic Analysis of Phase Space Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Private Attributes
Interpolator Class Reference

Interpolates between discrete samples of a scalar field. More...

#include <Interpolator.hh>

Public Member Functions

 Interpolator ()
 Default constructor, initilizes everything to 0. More...
 
 Interpolator (const Grid &grid, const bool ex=true, const std::string algo="linear")
 Grid constructor, sets matrix of vertices and their mapping on a grid. More...
 
 Interpolator (const std::vector< Vertex > &vertices, const bool ex=true, const std::string algo="simplex")
 Cloud constructor, sets vector of vertices and their mapping for a point cloud. More...
 
 Interpolator (const Interpolator &inter)
 Copy constructor. More...
 
Interpolator & operator= (const Interpolator &inter)
 Equality operator. More...
 
double operator() (const std::vector< double > &v) const
 Overloaded function operator, calls Evaluate. More...
 
double operator() (const double &v) const
 Overloaded function operator, calls Evaluate. More...
 
double operator() (const double *v) const
 Overloaded function operator, calls Evaluate. More...
 
 ~Interpolator ()
 Destructor. More...
 
double Evaluate (const std::vector< double > &v) const
 Performs the interpolation at an n-point v. More...
 
double Evaluate (const double &v) const
 Performs the interpolation at an n-point v. More...
 
double Evaluate (const double *v) const
 Performs the interpolation at an n-point v. More...
 
const size_t & GetDimension () const
 Returns the dimension of the space in which the interpolator lives. More...
 
const Grid & GetGrid () const
 Returns the grid on which the interpolator is built. More...
 
const Delaunay & GetTesselation () const
 Returns the tesselation on which the interpolator is built. More...
 
std::vector< TPolyLine * > Meshing () const
 Returns the meshing, used to build the interpolation, as polygons. More...
 

Private Attributes

size_t _dim
 Dimension of the space the interpolator lives in. More...
 
std::string _algo
 Algorithm to use for the interpolation. More...
 
Grid _grid
 Grid of N vertices and their mapping. More...
 
Delaunay _del
 Delaunary triangulation of the N vertices. More...
 
bool _ex
 Extrapolation switch. More...
 

Detailed Description

Interpolates between discrete samples of a scalar field.

Interpolates in x in an n-dimensional space provided with either of the following:

Constructor & Destructor Documentation

Interpolator::Interpolator ( )

Default constructor, initilizes everything to 0.

Interpolator::Interpolator ( const Grid &  grid,
const bool  ex = true,
const std::string  algo = "linear" 
)

Grid constructor, sets matrix of vertices and their mapping on a grid.

Parameters
gridGrid of N_1*...*N_n vertices and their mapping, n = dimension
exExtrapolate the outer cells to infinity if requested
algoInterpolation algorithm
Interpolator::Interpolator ( const std::vector< Vertex > &  vertices,
const bool  ex = true,
const std::string  algo = "simplex" 
)

Cloud constructor, sets vector of vertices and their mapping for a point cloud.

Parameters
verticesN_1*...*N_n vector of vertices, n = dimension
exExtrapolate outside the outmost points if requested
algoInterpolation algorithm
Interpolator::Interpolator ( const Interpolator &  inter)

Copy constructor.

Interpolator::~Interpolator ( )

Destructor.

Member Function Documentation

double Interpolator::Evaluate ( const std::vector< double > &  v) const

Performs the interpolation at an n-point v.

Parameters
vVector of coordinates of the n-point
double Interpolator::Evaluate ( const double &  v) const

Performs the interpolation at an n-point v.

Parameters
vOne dimensional value of the point
double Interpolator::Evaluate ( const double *  v) const

Performs the interpolation at an n-point v.

Parameters
vPointer to an array of coordinates of the n-point
const size_t& Interpolator::GetDimension ( ) const
inline

Returns the dimension of the space in which the interpolator lives.

const Grid& Interpolator::GetGrid ( ) const
inline

Returns the grid on which the interpolator is built.

const Delaunay& Interpolator::GetTesselation ( ) const
inline

Returns the tesselation on which the interpolator is built.

std::vector< TPolyLine * > Interpolator::Meshing ( ) const

Returns the meshing, used to build the interpolation, as polygons.

Returns
Meshing
double Interpolator::operator() ( const std::vector< double > &  v) const
inline

Overloaded function operator, calls Evaluate.

Parameters
vVector of coordinates
double Interpolator::operator() ( const double &  v) const
inline

Overloaded function operator, calls Evaluate.

Parameters
vOne dimensional value
double Interpolator::operator() ( const double *  v) const
inline

Overloaded function operator, calls Evaluate.

Parameters
vPointer to an array of coordinates
Interpolator & Interpolator::operator= ( const Interpolator &  inter)

Equality operator.

Field Documentation

std::string Interpolator::_algo
private

Algorithm to use for the interpolation.

Delaunay Interpolator::_del
private

Delaunary triangulation of the N vertices.

size_t Interpolator::_dim
private

Dimension of the space the interpolator lives in.

bool Interpolator::_ex
private

Extrapolation switch.

Grid Interpolator::_grid
private

Grid of N vertices and their mapping.


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