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