|
template<class IterT1 , class IterT2 , class IterT3 > |
| InterpSimplex (IterT1 grids_begin, IterT2 grids_len_begin, IterT3 f_begin, IterT3 f_end) |
|
template<class IterT1 , class IterT2 , class IterT3 , class RefCountIterT > |
| InterpSimplex (IterT1 grids_begin, IterT2 grids_len_begin, IterT3 f_begin, IterT3 f_end, ArrayRefCountT &refF, RefCountIterT ref_begins) |
|
template<class IterT > |
T | interp (IterT x_begin) const |
|
template<class IterT1 , class IterT2 > |
void | interp_vec (int n, IterT1 coord_iter_begin, IterT1 coord_iter_end, IterT2 i_result) const |
|
template<class IterT1 , class IterT2 , class IterT3 > |
| NDInterpolator (IterT1 grids_begin, IterT2 grids_len_begin, IterT3 f_begin, IterT3 f_end) |
|
template<class IterT1 , class IterT2 , class IterT3 , class RefCountIterT > |
| NDInterpolator (IterT1 grids_begin, IterT2 grids_len_begin, IterT3 f_begin, IterT3 f_end, ArrayRefCountT &refF, RefCountIterT grid_refs_begin) |
|
template<class IterT1 , class IterT2 , class IterT3 > |
void | init (IterT1 grids_begin, IterT2 grids_len_begin, IterT3 f_begin, IterT3 f_end) |
|
template<class IterT1 , class IterT2 , class IterT3 , class RefCountIterT > |
void | init_refcount (IterT1 grids_begin, IterT2 grids_len_begin, IterT3 f_begin, IterT3 f_end, ArrayRefCountT &refF, RefCountIterT grid_refs_begin) |
|
template<class IterT1 , class IterT2 > |
void | set_grids (IterT1 grids_begin, IterT2 grids_len_begin, bool bCopy) |
|
template<class IterT1 , class RefCountIterT > |
void | set_grids_refcount (RefCountIterT refs_begin, RefCountIterT refs_end) |
|
template<class IterT > |
void | set_f_array (IterT f_begin, IterT f_end, bool bCopy) |
|
void | set_f_refcount (ArrayRefCountT &refF) |
|
int | find_cell (int dim, T x) const |
|
T | get_f_val (array< int, N > const &cell_index, array< int, N > const &v_index) const |
|
T | get_f_val (array< int, N > const &cell_index, int v) const |
|
template<int N, class T, bool CopyData = true, bool Continuous = true, class ArrayRefCountT = EmptyClass, class GridRefCountT = EmptyClass>
class InterpSimplex< N, T, CopyData, Continuous, ArrayRefCountT, GridRefCountT >
Definition at line 222 of file linterp.h.
template<int N, class T, bool CopyData = true, bool Continuous = true, class ArrayRefCountT = EmptyClass, class GridRefCountT = EmptyClass>
template<class IterT1 , class IterT2 , class IterT3 >
InterpSimplex< N, T, CopyData, Continuous, ArrayRefCountT, GridRefCountT >::InterpSimplex |
( |
IterT1 |
grids_begin, |
|
|
IterT2 |
grids_len_begin, |
|
|
IterT3 |
f_begin, |
|
|
IterT3 |
f_end |
|
) |
| |
|
inline |
Definition at line 227 of file linterp.h.
228 :
super(grids_begin, grids_len_begin, f_begin, f_end)
NDInterpolator< N, T, CopyData, Continuous, ArrayRefCountT, GridRefCountT > super
template<int N, class T, bool CopyData = true, bool Continuous = true, class ArrayRefCountT = EmptyClass, class GridRefCountT = EmptyClass>
template<class IterT1 , class IterT2 , class IterT3 , class RefCountIterT >
InterpSimplex< N, T, CopyData, Continuous, ArrayRefCountT, GridRefCountT >::InterpSimplex |
( |
IterT1 |
grids_begin, |
|
|
IterT2 |
grids_len_begin, |
|
|
IterT3 |
f_begin, |
|
|
IterT3 |
f_end, |
|
|
ArrayRefCountT & |
refF, |
|
|
RefCountIterT |
ref_begins |
|
) |
| |
|
inline |
Definition at line 231 of file linterp.h.
232 :
super(grids_begin, grids_len_begin, f_begin, f_end, refF, ref_begins)
NDInterpolator< N, T, CopyData, Continuous, ArrayRefCountT, GridRefCountT > super
template<int N, class T, bool CopyData = true, bool Continuous = true, class ArrayRefCountT = EmptyClass, class GridRefCountT = EmptyClass>
template<class IterT1 , class IterT2 >
void InterpSimplex< N, T, CopyData, Continuous, ArrayRefCountT, GridRefCountT >::interp_vec |
( |
int |
n, |
|
|
IterT1 |
coord_iter_begin, |
|
|
IterT1 |
coord_iter_end, |
|
|
IterT2 |
i_result |
|
) |
| const |
|
inline |
Definition at line 247 of file linterp.h.
Referenced by linterp_simplex_1(), linterp_simplex_2(), and linterp_simplex_3().
248 assert(N == coord_iter_end - coord_iter_begin);
250 array<int,N> cell_index, v_index;
251 array<std::pair<T, int>,N> xipair;
255 for (
int i=0; i<n; i++) {
256 for (
int dim=0; dim<N; dim++) {
258 c = this->
find_cell(dim, coord_iter_begin[dim][i]);
262 }
else if (c == grid.size()-1) {
266 y = (coord_iter_begin[dim][i] - grid[c]) / (grid[c + 1] - grid[c]);
268 else if (y > 1.0) y=1.0;
270 xipair[dim].first = y;
271 xipair[dim].second = dim;
275 std::sort(xipair.begin(), xipair.end(), [](std::pair<T, int>
const &a, std::pair<T, int>
const &b) {
276 return (a.first < b.first);
279 for (
int j=0; j<N; j++) {
282 v0 = this->
get_f_val(cell_index, v_index);
284 for (
int j=0; j<N; j++) {
285 v_index[xipair[j].second]--;
286 v1 = this->
get_f_val(cell_index, v_index);
287 y += (1.0 - xipair[j].first) * (v1-v0);
T get_f_val(array< int, N > const &cell_index, array< int, N > const &v_index) const
boost::numeric::ublas::array_adaptor< T > grid_type
int find_cell(int dim, T x) const
vector< grid_type > m_grid_list