Clipper
Public Member Functions | List of all members
clipper::CHKL_data< T > Class Template Reference

Reflection data list container. More...

#include <container_hkl.h>

Inheritance diagram for clipper::CHKL_data< T >:
clipper::Container clipper::HKL_data< T > clipper::HKL_data_base

Public Member Functions

 CHKL_data ()
 null constructor
 
 CHKL_data (Container &parent, const String name="")
 constructor: inherit datalist and cell More...
 
void init (const HKL_info &hkl_info, const Cell &cell)
 initialiser: supply or inherit hkl list, and cell More...
 
void init (const Spacegroup &spacegroup, const Cell &cell, const HKL_sampling &hkl_sampling)
 initialiser: from spacegroup, cell, and HKL_sampling
 
void update ()
 hierarchical update More...
 
HKL_data< T > & operator= (const HKL_data< T > &other)
 assignment operator: copies the data from another list
 
HKL_data< T > & operator= (const T &value)
 assignment operator: assigns a single value to the whole list
 
- Public Member Functions inherited from clipper::Container
 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 Containerparent () const
 get the parent of this object
 
Containerparent ()
 get the parent of this object
 
int num_children () const
 return number of children
 
const Containerchild (const int &i) const
 get the i'th child of this object
 
Containerchild (const int &i)
 get the i'th child of this object
 
const Containerultimate_parent () const
 get the ultimate parent of this object - the top of the tree
 
Containerultimate_parent ()
 get the ultimate parent of this object - the top of the tree
 
Containerparent_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)
 
Containerfind_path_ptr (const String &path)
 find an object using a directory-like path (NULL on fail)
 
virtual ~Container ()
 destructor: virtual
 
void debug ()
 
- Public Member Functions inherited from clipper::HKL_data< T >
 HKL_data ()
 null constructor
 
 HKL_data (const HKL_info &hkl_info)
 constructor: from parent hkl_info More...
 
 HKL_data (const HKL_info &hkl_info, const Cell &cell)
 constructor: from parent hkl_info and cell More...
 
 HKL_data (const Spacegroup &spacegroup, const Cell &cell, const HKL_sampling &hkl_sampling)
 [CLIPPER2] constructor: from spacegroup, cell and hkl_sampling More...
 
 HKL_data (const HKL_data_base &hkl_data)
 [CLIPPER2] constructor: from another HKL_data object More...
 
void init (const HKL_info &hkl_info, const Cell &cell)
 initialiser: from parent hkl_info and cell More...
 
void init (const Spacegroup &spacegroup, const Cell &cell, const HKL_sampling &hkl_sampling)
 [CLIPPER2] initialiser: from spacegroup, cell, and HKL_sampling More...
 
void init (const HKL_data_base &hkl_data)
 [CLIPPER2] initialiser: from another HKL_data object More...
 
void update ()
 update: synchornize info with parent HKL_info More...
 
String type () const
 get data type (a list of names corresponding to the im/export values)
 
bool missing (const int &index) const
 check if a data entry in the list is marked as 'missing'
 
void set_null (const int &index)
 set data entry in the list to its null value
 
int data_size () const
 return number of data elements in this type
 
String data_names () const
 return names of data elements in this type
 
void data_export (const HKL &hkl, xtype array[]) const
 conversion to array (for I/O)
 
void data_import (const HKL &hkl, const xtype array[])
 conversion from array (for I/O)
 
void mask (const HKL_data_base &mask)
 
const T & operator[] (const HKL_info::HKL_reference_index &i) const
 get data by reflection HKL_reference_index
 
T & operator[] (const HKL_info::HKL_reference_index &i)
 set data by reflection HKL_reference_index
 
operator[] (const HKL_info::HKL_reference_coord &ih) const
 get data by HKL_reference_coord More...
 
bool get_data (const HKL_info::HKL_reference_coord &ih, T &data) const
 get data by HKL_reference_coord (returns false if no equivalent hkl) More...
 
bool set_data (const HKL_info::HKL_reference_coord &ih, const T &data)
 set data by HKL_reference_coord (returns false if no equivalent hkl) More...
 
const T & operator[] (const int &index) const
 get data by reflection index
 
T & operator[] (const int &index)
 set data by reflection index
 
operator[] (const HKL &hkl) const
 get data by hkl (returns missing if no equivalent hkl) More...
 
bool get_data (const HKL &hkl, T &data) const
 get data by hkl (returns false if no equivalent hkl) More...
 
bool set_data (const HKL &hkl, const T &data)
 set data by hkl (returns false if no equivalent hkl) More...
 
template<class C >
void compute (const C &op)
 Basic computation: fill this data list by function call.
 
template<class S , class C >
void compute (const HKL_data< S > &src, const C &op)
 Unary computation: fill this data list by computation from another.
 
template<class S1 , class S2 , class C >
void compute (const HKL_data< S1 > &src1, const HKL_data< S2 > &src2, const C &op)
 Binary computation: fill this data list by computation from another.
 
const HKL_infobase_hkl_info () const
 
const Cellbase_cell () const
 
const ftype invresolsq (const int &index) const
 
const Range< ftypeinvresolsq_range () const
 
const int num_obs () const
 
HKL_reference_index first () const
 
HKL_reference_index first_data () const
 
HKL_reference_indexnext_data (HKL_reference_index &ih) const
 
HKL_data< T > & operator= (const HKL_data< T > &other)
 assignment operator: copies the data from another list More...
 
HKL_data< T > & operator= (const T &value)
 assignment operator: assigns a single value to the whole list More...
 
void debug () const
 
- Public Member Functions inherited from clipper::HKL_data_base
bool is_null () const
 test if object has been initialised More...
 
const HKL_infobase_hkl_info () const
 get the parent HKL_info object
 
const Cellbase_cell () const
 get the parent cell
 
const Spacegroupspacegroup () const
 [CLIPPER2] get spacegroup
 
const Cellcell () const
 [CLIPPER2] get cell
 
const Resolutionresolution () const
 [CLIPPER2] get resolution
 
const HKL_samplinghkl_sampling () const
 [CLIPPER2] get HKL_sampling
 
const HKL_infohkl_info () const
 [CLIPPER2] get HKL_info object
 
ftype invresolsq (const int &index) const
 get resolution by reflection index (based on true cell) More...
 
Range< ftypeinvresolsq_range () const
 get resolution limits of the list (based on true cell and missing data) More...
 
int num_obs () const
 get number of observations in this list (based on missing data) More...
 
HKL_reference_index first () const
 return HKL_reference_index pointing to first reflection More...
 
HKL_reference_index first_data () const
 return HKL_reference_index pointing to first non-missing data More...
 
HKL_reference_indexnext_data (HKL_reference_index &ih) const
 increment HKL_reference_index to next non-missing data More...
 
void debug () const
 

Additional Inherited Members

- Public Types inherited from clipper::HKL_data_base
typedef
HKL_info::HKL_reference_index 
HKL_reference_index
 Basic HKL_reference_index: see HKL_info.
 
typedef
HKL_info::HKL_reference_coord 
HKL_reference_coord
 HKL HKL_reference_index: see HKL_info.
 
- Protected Member Functions inherited from clipper::HKL_data_base
 HKL_data_base ()
 null constructor More...
 
virtual ~HKL_data_base ()
 destructor
 
- Protected Attributes inherited from clipper::HKL_data< T >
std::vector< T > list
 
- Protected Attributes inherited from clipper::HKL_data_base
const HKL_infoparent_hkl_info
 
const Cellparent_cell
 
bool cell_matches_parent
 
ObjectCache< HKL_data_cacheobj >
::Reference 
cacheref
 object cache ref
 
Spacegroup spacegroup_
 
Cell cell_
 
HKL_sampling hkl_sampling_
 
Resolution resolution_
 

Detailed Description

template<class T>
class clipper::CHKL_data< T >

Reflection data list container.

CHKL_data: This is the list object containing the actual data. It must be indexed by a parent HKL list.

Constructor & Destructor Documentation

template<class T >
clipper::CHKL_data< T >::CHKL_data ( Container parent,
const String  name = "" 
)

constructor: inherit datalist and cell

The object is constructed at the given location in the hierarchy. An attempt is made to initialise the object using information from its parents in the hierarchy.

Parameters
parentAn object in the hierarchy (usually the parent of the new object).
nameThe path from parent to the new object (usually just the name of the new object).

Member Function Documentation

template<class T >
void clipper::CHKL_data< T >::init ( const HKL_info hkl_info,
const Cell cell 
)
virtual

initialiser: supply or inherit hkl list, and cell

An attempt is made to initialise the object using information from the supplied parameters, or if they are Null, from its parents in the hierarchy.

Parameters
hkl_infoThe reflection list object for this datalist.
cellThe cell object for this datalist.

Reimplemented from clipper::HKL_data_base.

template<class T >
void clipper::CHKL_data< T >::update ( )
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.

The data list is also synchronized with the parent reflection list.

Reimplemented from clipper::Container.


The documentation for this class was generated from the following file: