Clipper
|
#include <coords.h>
Public Member Functions | |
Coord_grid () | |
null constructor | |
Coord_grid (const Vec3< int > v) | |
constructor: copy/convert | |
Coord_grid (const int &u, const int &v, const int &w) | |
constructor: from u,v,w | |
Coord_grid (const Grid &g, const int &index) | |
constructor: from a grid and an index in that grid | |
const int & | u () const |
get u | |
const int & | v () const |
get v | |
const int & | w () const |
get w | |
int & | u () |
set u | |
int & | v () |
set v | |
int & | w () |
set w | |
Coord_map | coord_map () const |
convert to Coord_map | |
Coord_frac | coord_frac (const Grid_sampling &g) const |
convert to Coord_frac using given Grid_sampling | |
Coord_grid | transform (const Isymop &op) const |
return transformed coordinate | |
Coord_grid | unit (const Grid_sampling &g) const |
reduce to unit box: (0..nu-1, 0..nv-1, 0..nw-1) | |
const Coord_grid & | next (const Grid &g) |
increment in storage order (see index()) | |
const Coord_grid & | next (const Grid_range &g) |
increment in storage order (see index()) | |
bool | last (const Grid &g) const |
test if done in storage order (see index()) | |
bool | last (const Grid_range &g) const |
test if done in storage order (see index()) | |
int | index (const Grid &g) const |
grid indexing operator | |
void | deindex (const Grid &g, const int &index) |
grid deindexing operator | |
String | format () const |
return formatted String representation | |
Friends | |
Coord_grid | operator- (const Coord_grid &r1) |
Coord_grid | operator+ (const Coord_grid &r1, const Coord_grid &r2) |
Coord_grid | operator- (const Coord_grid &r1, const Coord_grid &r2) |
Coord_grid | operator* (const int &s, const Coord_grid &r1) |
int | operator== (const Coord_grid &r1, const Coord_grid &r2) |
int | operator!= (const Coord_grid &r1, const Coord_grid &r2) |
Coord_grid | operator* (const Isymop &op, const Coord_grid &r1) |
Grid coordinate.
Coord_map clipper::Coord_grid::coord_map | ( | ) | const [inline] |
convert to Coord_map
Referenced by clipper::Xmap_base::Map_reference_coord::coord_orth(), clipper::Xmap_base::Map_reference_index::coord_orth(), clipper::NX_operator::nxmap_data(), and clipper::NX_operator::xmap_data().
Coord_frac clipper::Coord_grid::coord_frac | ( | const Grid_sampling & | g | ) | const [inline] |
convert to Coord_frac using given Grid_sampling
Fractional coordinate is not normalised onto range 0..1
g | The grid concerned |
References clipper::Grid_sampling::nu(), clipper::Grid_sampling::nv(), clipper::Grid_sampling::nw(), u(), v(), and w().
Coord_grid clipper::Coord_grid::unit | ( | const Grid_sampling & | g | ) | const [inline] |
reduce to unit box: (0..nu-1, 0..nv-1, 0..nw-1)
g | The grid concerned |
References Coord_grid(), clipper::Util::mod(), clipper::Grid_sampling::nu(), clipper::Grid_sampling::nv(), clipper::Grid_sampling::nw(), u(), v(), and w().
Referenced by clipper::FFTmap_sparse_p1_xh::get_hkl(), clipper::FFTmap_p1::get_hkl(), clipper::FFTmap::get_real_data(), clipper::Xmap_base::multiplicity(), clipper::FFTmap_sparse_p1_xh::require_hkl(), clipper::FFTmap_sparse_p1_hx::set_hkl(), clipper::FFTmap_p1::set_hkl(), clipper::FFTmap::set_real_data(), clipper::Xmap_base::to_map_unit(), and clipper::Xmap_cacheobj::Xmap_cacheobj().
const Coord_grid & clipper::Coord_grid::next | ( | const Grid & | g | ) | [inline] |
increment in storage order (see index())
guaranteed to increment index(g) by 1
The grid coordinate is incremented efficiently in a manner which is exaclty equivalent to increasing index() by 1 in a zero based grid.
g | The grid with which this increment is synchronised. |
References clipper::Grid::nv(), clipper::Grid::nw(), u(), v(), and w().
Referenced by clipper::Xmap_cacheobj::Xmap_cacheobj().
const Coord_grid & clipper::Coord_grid::next | ( | const Grid_range & | g | ) | [inline] |
increment in storage order (see index())
guaranteed to increment index(g) by 1
The grid coordinate is incremented efficiently in a manner which is exaclty equivalent to increasing index() by 1 in a non-zero based grid.
g | The grid with which this increment is synchronised. |
References clipper::Grid_range::max(), clipper::Grid_range::min(), u(), v(), and w().
bool clipper::Coord_grid::last | ( | const Grid & | g | ) | const [inline] |
test if done in storage order (see index())
Test whether this coordinate has been incremented using next() beyond the end of the specified zero based grid.
g | The grid concerned. |
References clipper::Grid::nu(), and u().
Referenced by clipper::Xmap_cacheobj::Xmap_cacheobj().
bool clipper::Coord_grid::last | ( | const Grid_range & | g | ) | const [inline] |
test if done in storage order (see index())
Test whether this coordinate has been incremented using next() beyond the end of the specified non-zero based grid.
g | The grid concerned. |
References clipper::Grid_range::max(), and u().
int clipper::Coord_grid::index | ( | const Grid & | g | ) | const [inline] |
grid indexing operator
Return the index in a 1-d array corresponding to this coordinate for a zero based grid.
g | The grid concerned. |
References clipper::Grid::nv(), clipper::Grid::nw(), u(), v(), and w().
Referenced by deindex(), and clipper::Grid::index().
void clipper::Coord_grid::deindex | ( | const Grid & | g, |
const int & | index | ||
) | [inline] |
grid deindexing operator
Return the coordinate corresponding to a given index in a zero based grid.
g | The grid concerned. |
References index(), clipper::Grid::nv(), clipper::Grid::nw(), u(), v(), and w().
Referenced by Coord_grid().
String clipper::Coord_grid::format | ( | ) | const |
return formatted String representation
Reimplemented from clipper::Vec3< int >.