Wrapper class for third-order (cubic) interpolation fns.
More...
#include <map_interp.h>
|
template<class M > |
static bool | can_interp (const M &map, const Coord_map &pos) |
| Test if we can interpolate in map M at coord.
|
|
template<class T , class M > |
static void | interp (const M &map, const Coord_map &pos, T &val) |
| Interpolate map M using type T at coord.
|
|
template<class T , class M > |
static void | interp_grad (const M &map, const Coord_map &pos, T &val, Grad_map< T > &grad) |
|
template<class T , class M > |
static void | interp_curv (const M &map, const Coord_map &pos, T &val, Grad_map< T > &grad, Curv_map< T > &curv) |
|
static int | order () |
| Order of interpolant.
|
|
Wrapper class for third-order (cubic) interpolation fns.
These can be used through the built-in methods in Xmap/NXmap, or passed to methods to allow a choice of interpolation methods, or directly by providing the map as an argument. For example:
float x1, x2;
...
Interp_cubic::interp( nxmap, c, x1 );
map coordinate: this is like Coord_grid, but non-integer
Definition coords.h:388
Wrapper class for third-order (cubic) interpolation fns.
Definition map_interp.h:109
NXmap<T>: actual non-crystallographic map class.
Definition nxmap.h:261
T interp(const Coord_map &pos) const
get map value for map coord using supplied interpolator
Definition nxmap.h:376
◆ can_interp()
template<class M >
bool clipper::Interp_cubic::can_interp |
( |
const M & | map, |
|
|
const Coord_map & | pos ) |
|
static |
Test if we can interpolate in map M at coord.
The map is queried to see if interpolation is possible at the given coord. For a crystallographic map, this is always true. For a non-crystallographic map, this depends if the point and enough neighbours are in the grid.
- Parameters
-
map | The map on which to perform the calculation. |
pos | The map coord at which the density is to be calcuated. |
◆ interp()
template<class T , class M >
void clipper::Interp_cubic::interp |
( |
const M & | map, |
|
|
const Coord_map & | pos, |
|
|
T & | val ) |
|
static |
Interpolate map M using type T at coord.
The value of the map at the supplied map coordinate is calculated by third order (cubic) interpolation based on the surrounding 64 points.
- Parameters
-
pos | The fractional coord at which the density is to be calcuated. |
- Returns
- The value of the density at that point.
◆ interp_grad()
template<class T , class M >
void clipper::Interp_cubic::interp_grad |
( |
const M & | map, |
|
|
const Coord_map & | pos, |
|
|
T & | val, |
|
|
Grad_map< T > & | grad ) |
|
static |
The value of the map at the supplied map coordinate and its gradient are calculated by third order (cubic) interpolation based on the surrounding 64 points.
- Parameters
-
pos | The fractional coord at which the density is to be calcuated. |
val | The value of the density at that point. |
grad | The interpolated value as a gradient vector with respect to the fractional coordinates (see Cell::coord_orth). |
◆ interp_curv()
template<class T , class M >
void clipper::Interp_cubic::interp_curv |
( |
const M & | map, |
|
|
const Coord_map & | pos, |
|
|
T & | val, |
|
|
Grad_map< T > & | grad, |
|
|
Curv_map< T > & | curv ) |
|
static |
The value of the map at the supplied map coordinate and its gradient are calculated by third order (cubic) interpolation based on the surrounding 64 points.
- Parameters
-
pos | The fractional coord at which the density is to be calcuated. |
val | The value of the density at that point. |
grad | The interpolated value as a gradient vector with respect to the fractional coordinates (see Cell::coord_orth). |
The documentation for this class was generated from the following file: