276 {
return list[i.index()]; }
279 {
return list[i.index()]; }
283 {
return list[i.index()]; }
286 {
return list[i.index()]; }
331 {
return I::can_interp( *
this, cm ); }
339 { init( grid, rt ); }
349 { init( cell, grid, grid_extent ); }
379 I::interp( *
this, pos, val );
395 I::interp_grad( *
this, pos, val, grad );
410 I::interp_curv( *
this, pos, val, grad, curv );
420 for ( im = first(); !im.last(); im.
next() ) list[im.index()] = value;
428 if ( grid() != other.grid() )
431 for ( im = first(); !im.last(); im.
next() ) list[im.index()] += other[im];
438 if ( grid() != other.grid() )
441 for ( im = first(); !im.last(); im.
next() ) list[im.index()] -= other[im];
Map_reference_coord & set_coord(const Coord_grid &pos)
Set current value of coordinate - optimised for nearby coords.
Definition: nxmap.h:191
bool in_grid(Coord_grid g) const
determine if a point is in the grid
Definition: coords.h:491
const int & u() const
get u
Definition: coords.h:248
const RTop & operator_grid_orth() const
return the grid-to-orthogonal coordinate operator
Definition: nxmap.h:77
Fatal message (level = 9)
Definition: clipper_message.h:129
const T & operator[](const NXmap_base::Map_reference_index i) const
get data by Map_reference_index
Definition: nxmap.h:275
Map_reference_coord & next_w()
increment w
Definition: nxmap.h:203
Coord_grid pos_
Current coord.
Definition: nxmap.h:216
NXmap_base: base for non-crystallographic map class.
Definition: nxmap.h:66
NXmap_base()
Null constructor, for later initialisation.
Definition: nxmap.cpp:53
Map reference with index-like behaviour.
Definition: nxmap.h:129
Map_reference_coord()
Null constructor.
Definition: nxmap.h:178
int index_
integer index into map data array
Definition: nxmap.h:115
map coordinate: this is like Coord_grid, but non-integer
Definition: coords.h:387
Map_reference_coord & next()
Simple increment.
Definition: nxmap.h:195
orthogonal (Angstrom) coordinates
Definition: coords.h:302
const Grid & grid() const
return the grid dimensions for this map
Definition: nxmap.h:73
Grid coordinate.
Definition: coords.h:236
const T & operator=(const T &value)
assignment operator: assigns a single value to the whole map
Definition: nxmap.h:416
const Coord_orth coord_orth() const
Get current value of orthogonal coordinate.
Definition: nxmap.h:144
const NXmap< T > & operator-=(const NXmap< T > &other)
subtract another map from this one
Definition: nxmap.h:436
void init(const Grid &grid, const RTop<> &rt)
initialiser: takes grid and orthogonal->grid coordinate operator
Definition: nxmap.h:356
Map_reference_coord first_coord() const
return a coord Map_reference_index for this map
Definition: nxmap.h:222
bool in_map(const Coord_grid &pos) const
is the given coord available in the map?
Definition: nxmap.h:90
generic grid
Definition: coords.h:479
Map_reference_index()
Null constructor.
Definition: nxmap.h:133
void init(const Grid &grid, const RTop<> &rt)
initialiser: takes grid and orthogonal->grid coordinate operator
Definition: nxmap.cpp:65
Map_reference_coord(const NXmap_base &map)
Constructor: need parent map.
Definition: nxmap.h:180
Map_reference_index(const NXmap_base &map)
Constructor: need parent map.
Definition: nxmap.h:135
int index_offset(const int &du, const int &dv, const int &dw) const
Index of neighbouring point.
Definition: nxmap.h:154
Map_reference_coord & prev_v()
decrement v
Definition: nxmap.h:205
int size() const
return size of grid array
Definition: coords.h:489
Map_reference_coord & prev_w()
decrement w
Definition: nxmap.h:206
void interp_curv(const Coord_map &pos, T &val, Grad_map< T > &grad, Curv_map< T > &curv) const
get map value and curv for map coord using supplied interpolator
Definition: nxmap.h:408
Cell object.
Definition: cell.h:121
map coordinate curvatures, with respect to grid u,v,w
Definition: derivs.h:59
Coord_map coord_map(const Coord_orth &co) const
convert orthogonal coordinate to map
Definition: nxmap.h:86
Map_reference_coord(const NXmap_base &map, const Coord_grid &pos)
Constructor: need parent map and coord.
Definition: nxmap.h:183
Map_reference_coord & next_v()
increment v
Definition: nxmap.h:202
bool last() const
Check for end of map.
Definition: nxmap.h:110
Grid range class: defines array limits for a grid.
Definition: coords.h:584
Map_reference_index & set_coord(const Coord_grid &pos)
Set current value of coordinate - optimised for nearby coords.
Definition: nxmap.h:147
void set_data(const Coord_grid &pos, const T &val)
set a density value for an arbitrary position
Definition: nxmap.h:292
Coord_grid coord() const
Get current grid coordinate.
Definition: nxmap.h:141
int index(const Coord_grid &c) const
grid indexing operator
Definition: coords.h:494
int dw
steps for shifts along u,v,w
Definition: nxmap.h:228
Map_reference_coord & operator=(const Coord_grid &pos)
Assignment operator from a coord.
Definition: nxmap.h:208
Map reference base class.
Definition: nxmap.h:102
T interp(const Coord_map &pos) const
get map value for map coord using supplied interpolator
Definition: nxmap.h:376
Coord_grid coord() const
Get current value of coordinate.
Definition: nxmap.h:186
const int & w() const
get w
Definition: coords.h:250
RTop rt_grid_orth
grid->orth operator
Definition: nxmap.h:227
Map_reference_coord & prev_u()
decrement u
Definition: nxmap.h:204
Coord_orth coord_orth(const Coord_map &cm) const
convert map coordinate to orthogonal
Definition: nxmap.h:81
bool is_null() const
test if object has been initialised
Definition: nxmap.cpp:94
RTop rt_orth_grid
orth->grid operator
Definition: nxmap.h:226
static void message(const T &message)
pass a message
Definition: clipper_message.h:93
void interp_grad(const Coord_map &pos, T &val, Grad_map< T > &grad) const
get map value and grad for map coord using supplied interpolator
Definition: nxmap.h:393
const NXmap< T > & operator+=(const NXmap< T > &other)
add another map to this one
Definition: nxmap.h:426
Grid sampling of a unit cell.
Definition: coords.h:515
map coordinate gradient, with respect to grid u,v,w
Definition: derivs.h:56
const int & v() const
get v
Definition: coords.h:249
Coord_grid deindex(const int &index) const
grid deindexing operator
Definition: coords.h:496
int multiplicity(const Coord_grid &) const
get multiplicity of a map grid point (always 1 for NXmap)
Definition: nxmap.h:95
Map_reference_coord & next_u()
increment u
Definition: nxmap.h:201
Map_reference_index first() const
return a basic Map_reference_index for this map
Definition: nxmap.h:220
NXmap()
Null constructor, for later initialisation.
Definition: nxmap.h:264
const RTop & operator_orth_grid() const
return the orthogonal-to-grid coordinate operator
Definition: nxmap.h:75
Map_reference_index(const NXmap_base &map, const Coord_grid &pos)
Constructor: need parent map and coord.
Definition: nxmap.h:138
const Coord_orth coord_orth() const
Get current value of orthogonal coordinate.
Definition: nxmap.h:188
NXmap: actual non-crystallographic map class.
Definition: nxmap.h:260
const int & index() const
Get the index into the map data array.
Definition: nxmap.h:108
const NXmap_base * map_
pointer to map for which this Map_reference_index is defined
Definition: nxmap.h:113
const T & get_data(const Coord_grid &pos) const
get a density value for an arbitrary position
Definition: nxmap.h:289
Map_reference_index & next()
Simple increment.
Definition: nxmap.h:150
const NXmap_base & base_nxmap() const
return the parent NXmap
Definition: nxmap.h:106
Map reference with coordinate-like behaviour.
Definition: nxmap.h:174
Grid grid_
grid for the map
Definition: nxmap.h:225