#include <map_interp.h>
Static Public Member Functions | |
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. | |
static int | order () |
Order of interpolant. |
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:
NXmap<float> nxmap; Coord_map c; float x1, x2; ... Interp_linear<float>::interp( nxmap, c, x1 ); x2 = nxmap.interp<Interp_linear>( c );
bool clipper::Interp_linear::can_interp | ( | const M & | map, | |
const Coord_map & | pos | |||
) | [inline, 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.
map | The map on which to perform the calculation. | |
pos | The map coord at which the density is to be calcuated. |
void clipper::Interp_linear::interp | ( | const M & | map, | |
const Coord_map & | pos, | |||
T & | val | |||
) | [inline, static] |
Interpolate map M using type T at coord.
The value of the map at the supplied map coordinate is calculated by first order (linear) interpolation based on 8 neighbouring points.
map | The map on which to perform the calculation. | |
pos | The map coord at which the density is to be calcuated. |