PLaSK library
Loading...
Searching...
No Matches
plask::interpolation Namespace Reference

Functions

template<typename T >
linear (double p_lo, const T &d_lo, double p_hi, const T &d_hi, double p)
 Calculate linear interpolation (in 1D space).
 
template<typename T >
bilinear (double p_l, double p_r, double p_b, double p_t, const T &d_lb, const T &d_rb, const T &d_rt, const T &d_lt, double p_x, double p_y)
 Calculate blilinear interpolation (in 2D space).
 
template<typename T >
trilinear (double p_l, double p_r, double p_b, double p_t, double p_lo, double p_hi, const T &lo_d_lb, const T &lo_d_rb, const T &lo_d_rt, const T &lo_d_lt, const T &hi_d_lb, const T &hi_d_rb, const T &hi_d_rt, const T &hi_d_lt, double p_x, double p_y, double p_lohi)
 Calculate trililinear interpolation (in 3D space).
 

Function Documentation

◆ bilinear()

template<typename T >
T plask::interpolation::bilinear ( double  p_l,
double  p_r,
double  p_b,
double  p_t,
const T &  d_lb,
const T &  d_rb,
const T &  d_rt,
const T &  d_lt,
double  p_x,
double  p_y 
)
inline

Calculate blilinear interpolation (in 2D space).

Parameters
p_l,p_r,p_b,p_tleft, right, bottom, top positions, must fulfill: p_l < p_r, p_b < p_t
d_lb,d_rb,d_rt,d_ltvalue in points: left-bottom, right-bottom, right-top, left-top
p_x,p_yrequested point
Returns
interpolated value, calculated for requested point p_x, p_y

Definition at line 44 of file interpolation.hpp.

◆ linear()

template<typename T >
T plask::interpolation::linear ( double  p_lo,
const T &  d_lo,
double  p_hi,
const T &  d_hi,
double  p 
)
inline

Calculate linear interpolation (in 1D space).

Parameters
p_lo,d_lofirst point and value in it
p_hi,d_hisecond point and value in it, must fulfill: p_lo < p_hi
prequested point
Returns
interpolated value, calculated for requested point p

Definition at line 31 of file interpolation.hpp.

◆ trilinear()

template<typename T >
T plask::interpolation::trilinear ( double  p_l,
double  p_r,
double  p_b,
double  p_t,
double  p_lo,
double  p_hi,
const T &  lo_d_lb,
const T &  lo_d_rb,
const T &  lo_d_rt,
const T &  lo_d_lt,
const T &  hi_d_lb,
const T &  hi_d_rb,
const T &  hi_d_rt,
const T &  hi_d_lt,
double  p_x,
double  p_y,
double  p_lohi 
)
inline

Calculate trililinear interpolation (in 3D space).

Parameters
p_l,p_r,p_b,p_tleft, right, bottom, top positions, must fulfill: p_l < p_r, p_b < p_t
p_lo,p_hipositions of points in thirth direction, must fulfill p_lo < p_hi
lo_d_lb,lo_d_rb,lo_d_rt,lo_d_ltvalue in points: lo-left-bottom, lo-right-bottom, lo-right-top, lo-left-top
hi_d_lb,hi_d_rb,hi_d_rt,hi_d_ltvalue in points: hi-left-bottom, hi-right-bottom, hi-right-top, hi-left-top
p_x,p_y,p_lohirequested point
Returns
interpolated value, calculate for requested point p_x, p_y, p_lohi

Definition at line 64 of file interpolation.hpp.