Reaktoro 
A unified framework for modeling chemically reactive systems
Reaktoro::BilinearInterpolator Class Reference

Detailed Description

A class used to calculate bilinear interpolation of data in two dimensions.

#include <BilinearInterpolator.hpp>

Public Member Functions

 BilinearInterpolator ()
 Construct a default BilinearInterpolator instance.
 
 BilinearInterpolator (const std::vector< double > &xcoordinates, const std::vector< double > &ycoordinates, const std::vector< double > &data)
 Construct a BilinearInterpolator instance with given data. More...
 
 BilinearInterpolator (const std::vector< double > &xcoordinates, const std::vector< double > &ycoordinates, const std::function< double(double, double)> &function)
 Construct a BilinearInterpolator instance with given function. More...
 
auto setCoordinatesX (const std::vector< double > &xcoordinates) -> void
 setCoordinatesY the x-coordinates of the interpolation
 
auto setCoordinatesY (const std::vector< double > &ycoordinates) -> void
 Set the y-coordinates of the interpolation.
 
auto setData (const std::vector< double > &data) -> void
 Set the x-coordinates of the interpolation.
 
auto xCoodinates () const -> const std::vector< double > &
 Return the x-coordinates of the interpolation.
 
auto yCoodinates () const -> const std::vector< double > &
 Return the y-coordinates of the interpolation.
 
auto data () const -> const std::vector< double > &
 Return the interpolation data.
 
auto empty () const -> bool
 Check if the BilinearInterpolator instance is empty.
 
auto operator() (double x, double y) const -> double
 Calculate the interpolation at the provided (x, y) point. More...
 

Constructor & Destructor Documentation

Reaktoro::BilinearInterpolator::BilinearInterpolator ( const std::vector< double > &  xcoordinates,
const std::vector< double > &  ycoordinates,
const std::vector< double > &  data 
)

Construct a BilinearInterpolator instance with given data.

Parameters
xcoordinatesThe x-coordinates for the interpolation
ycoordinatesThe y-coordinates for the interpolation
dataThe data to be interpolated over the (x, y) coordinates
Reaktoro::BilinearInterpolator::BilinearInterpolator ( const std::vector< double > &  xcoordinates,
const std::vector< double > &  ycoordinates,
const std::function< double(double, double)> &  function 
)

Construct a BilinearInterpolator instance with given function.

Parameters
xcoordinatesThe x-coordinates for the interpolation
ycoordinatesThe y-coordinates for the interpolation
functionThe function to be interpolated over the (x, y) coordinates

Member Function Documentation

auto Reaktoro::BilinearInterpolator::operator() ( double  x,
double  y 
) const -> double

Calculate the interpolation at the provided (x, y) point.

Parameters
xThe x-coordinate of the point
yThe y-coordinate of the point
Returns
The interpolation of the data at (x, y) point

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