Reaktoro  v2.11.0
A unified framework for modeling chemically reactive systems
BilinearInterpolator Class Reference

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

#include <BilinearInterpolator.hpp>

Public Member Functions

 BilinearInterpolator ()
 Construct a default BilinearInterpolator instance.
 
 BilinearInterpolator (const Vec< double > &xcoordinates, const Vec< double > &ycoordinates, const Vec< double > &data)
 Construct a BilinearInterpolator instance with given data. More...
 
 BilinearInterpolator (const Vec< double > &xcoordinates, const Vec< double > &ycoordinates, const Vec< Vec< double >> &data)
 Construct a BilinearInterpolator instance with given data. More...
 
 BilinearInterpolator (const Vec< double > &xcoordinates, const Vec< double > &ycoordinates, const Fn< double(double, double)> &function)
 Construct a BilinearInterpolator instance with given function. More...
 
auto setCoordinatesX (const Vec< double > &xcoordinates) -> void
 Set the x-coordinates of the interpolation.
 
auto setCoordinatesY (const Vec< double > &ycoordinates) -> void
 Set the y-coordinates of the interpolation.
 
auto setData (const Vec< double > &data) -> void
 Set the data to be interpolated.
 
auto setData (const Vec< Vec< double >> &data) -> void
 Set the data to be interpolated.
 
auto xCoordinates () const -> const Vec< double > &
 Return the x-coordinates of the interpolation.
 
auto yCoordinates () const -> const Vec< double > &
 Return the y-coordinates of the interpolation.
 
auto data () const -> const Vec< double > &
 Return the interpolation data.
 
auto empty () const -> bool
 Check if the BilinearInterpolator instance is empty.
 
auto operator() (real x, real y) const -> real
 Calculate the interpolation at the provided (x, y) point. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ BilinearInterpolator() [1/3]

BilinearInterpolator ( const Vec< double > &  xcoordinates,
const Vec< double > &  ycoordinates,
const Vec< 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

◆ BilinearInterpolator() [2/3]

BilinearInterpolator ( const Vec< double > &  xcoordinates,
const Vec< double > &  ycoordinates,
const Vec< Vec< 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

◆ BilinearInterpolator() [3/3]

BilinearInterpolator ( const Vec< double > &  xcoordinates,
const Vec< double > &  ycoordinates,
const Fn< 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

◆ operator()()

auto operator() ( real  x,
real  y 
) const -> real

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 file: