PLaSK library

Loading...
Searching...
No Matches
Functions
plask::interpolation Namespace Reference

## Functions
template<typename T >
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 >
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 >
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_t | left, right, bottom, top positions, must fulfill: p_l < p_r, p_b < p_t
  d_lb,d_rb,d_rt,d_lt | value in points: left-bottom, right-bottom, right-top, left-top
  p_x,p_y | requested 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_lo | first point and value in it
  p_hi,d_hi | second point and value in it, must fulfill: p_lo < p_hi
  p | requested 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_t | left, right, bottom, top positions, must fulfill: p_l < p_r, p_b < p_t
  p_lo,p_hi | positions of points in thirth direction, must fulfill p_lo < p_hi
  lo_d_lb,lo_d_rb,lo_d_rt,lo_d_lt | value 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_lt | value in points: hi-left-bottom, hi-right-bottom, hi-right-top, hi-left-top
  p_x,p_y,p_lohi | requested point

Returns
  interpolated value, calculate for requested point p_x, p_y, p_lohi

Definition at line 64 of file interpolation.hpp.