Clipper
|
CGrid_sampling container. More...
#include <container_types.h>
Public Member Functions | |
CGrid_sampling (const String name="", const Grid_sampling &grid=NullGrid_sampling) | |
constructor: make null object or top object in tree More... | |
CGrid_sampling (Container &parent, const String name="", const ftype rate=1.5) | |
constructor: make child object More... | |
CGrid_sampling (Container &parent, const String name, const Grid_sampling &grid) | |
constructor: make child object with explicit value More... | |
void | init (const Spacegroup &spacegroup, const Cell &cell, const Resolution &resolution, const ftype rate) |
initialiser: from sampling rate More... | |
void | init (const Grid_sampling &grid_sampling_) |
initialiser: from Grid_sampling More... | |
void | update () |
hierarchical update More... | |
![]() | |
Container (const String name="") | |
constructor: make null object or top object in a tree | |
Container (Container &parent, const String &path) | |
constructor: from any other member and a relative path | |
String | path () const |
get the path of this tree object | |
String | name () const |
get the name of this tree object | |
void | set_name (const String &name) |
set the name of this tree object | |
bool | is_destroyed_with_parent () const |
is this object to be destroyed when parent is destroyed? | |
void | set_destroyed_with_parent (const bool d=true) |
set this object to be destroyed when parent is destroyed | |
void | move (const String &path) |
'move' method moves this object to somewhere else in the hierarchy | |
bool | has_parent () const |
test if this object has a parent | |
const Container & | parent () const |
get the parent of this object | |
Container & | parent () |
get the parent of this object | |
int | num_children () const |
return number of children | |
const Container & | child (const int &i) const |
get the i'th child of this object | |
Container & | child (const int &i) |
get the i'th child of this object | |
const Container & | ultimate_parent () const |
get the ultimate parent of this object - the top of the tree | |
Container & | ultimate_parent () |
get the ultimate parent of this object - the top of the tree | |
Container * | parent_ptr () |
get the parent of this object (NULL on fail) | |
template<class T > | |
T * | parent_of_type_ptr () |
search up the tree for a parent of the specified type (NULL on fail) | |
Container * | find_path_ptr (const String &path) |
find an object using a directory-like path (NULL on fail) | |
virtual | ~Container () |
destructor: virtual | |
void | debug () |
![]() | |
Grid_sampling () | |
null constructor | |
Grid_sampling (const int &nu, const int &nv, const int &nw) | |
constructor: from nu, nv, nw | |
Grid_sampling (const Spacegroup &spacegroup, const Cell &cell, const Resolution &resol, const ftype rate=1.5) | |
constructor: from Spacegroup, Cell, Resolution, Shannon rate More... | |
void | init (const Spacegroup &spacegroup, const Cell &cell, const Resolution &resol, const ftype rate=1.5) |
initialiser: from Spacegroup, Cell, Resolution, Shannon rate More... | |
Mat33 | matrix_grid_frac () const |
return matrix which converts grid to fractional coordinates More... | |
Mat33 | matrix_frac_grid () const |
return matrix which converts fractional to grid coordinates More... | |
bool | is_null () const |
test if object has been initialised More... | |
const int & | nu () const |
const int & | nv () const |
const int & | nw () const |
int | size () const |
int | index (const Coord_grid &c) const |
Coord_grid | deindex (const int &index) const |
const String | format () const |
![]() | |
Grid () | |
null constructor | |
Grid (const int &nu, const int &nv, const int &nw) | |
constructor: from nu,nv,nw | |
const int & | nu () const |
get nu | |
const int & | nv () const |
get nv | |
const int & | nw () const |
get nw | |
int | size () const |
return size of grid array | |
bool | in_grid (Coord_grid g) const |
determine if a point is in the grid | |
int | index (const Coord_grid &c) const |
grid indexing operator | |
Coord_grid | deindex (const int &index) const |
grid deindexing operator | |
String | format () const |
return formatted String representation More... | |
void | debug () const |
![]() | |
Vec3 () | |
null constructor | |
Vec3 (const int &v0, const int &v1, const int &v2) | |
constructor: from individual values | |
Vec3 (const Vec3< TT > &v) | |
constructor: copy/convert | |
bool | equals (const Vec3< int > &v, const int &tol) const |
test equality | |
const int & | operator[] (const int &i) const |
get element | |
int & | operator[] (const int &i) |
set element | |
Vec3< int > | unit () const |
return unit vector with same direction as this vector | |
bool | is_null () const |
test for null vector | |
String | format () const |
return formatted String representation | |
const Vec3< int > & | operator+= (const Vec3< int > &v) |
add another vector to this one | |
const Vec3< int > & | operator-= (const Vec3< int > &v) |
subtract another vector from this one | |
Additional Inherited Members | |
![]() | |
static Vec3< int > | zero () |
return zero vector | |
static Vec3< int > | null () |
return null vector (only valid for floating point types) | |
static int | dot (const Vec3< int > &v1, const Vec3< int > &v2) |
Vector dot product (equivalent to *) | |
static Vec3< int > | cross (const Vec3< int > &v1, const Vec3< int > &v2) |
Vector cross product. | |
CGrid_sampling container.
CGrid_sampling: This has a name and a grid sampling It overrides the grid sampling for any objects below it.
clipper::CGrid_sampling::CGrid_sampling | ( | const String | name = "" , |
const Grid_sampling & | grid = NullGrid_sampling |
||
) |
constructor: make null object or top object in tree
The top object in a tree is initialised from a known grid.
name | The object name. |
grid | The grid sampling. |
clipper::CGrid_sampling::CGrid_sampling | ( | Container & | parent, |
const String | name = "" , |
||
const ftype | rate = 1.5 |
||
) |
constructor: make child object
The normal form for a child object - spacegroup and cell inherited.
parent | The objects parent. |
name | The object name. |
rate | The Shannon rate (default 1.5). |
clipper::CGrid_sampling::CGrid_sampling | ( | Container & | parent, |
const String | name, | ||
const Grid_sampling & | grid | ||
) |
constructor: make child object with explicit value
This is still a child object but is initialised directly.
parent | The objects parent. |
name | The object name. |
grid | The grid sampling. |
void clipper::CGrid_sampling::init | ( | const Spacegroup & | spacegroup, |
const Cell & | cell, | ||
const Resolution & | resolution, | ||
const ftype | rate | ||
) |
initialiser: from sampling rate
The object is initialised if the appropriate parent objects are available, and children are updated.
spacegroup | The spacegroup. |
cell | The cell. |
resolution | The resolution. |
rate_ | The Shannon rate (If <1 previous value is used, default 1.5). |
void clipper::CGrid_sampling::init | ( | const Grid_sampling & | grid_sampling_ | ) |
initialiser: from Grid_sampling
The object is initialised, and children are updated.
grid_sampling_ | The value to give to the contained object. |
|
virtual |
hierarchical update
Hierarchical update. If this object is uninitialised, an attempt is made to initialise the object using information from its parents in the hierarchy. The childen of the object are then updated.
Reimplemented from clipper::Container.