Clipper
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
clipper::HKL_data_base Class Reference

HKL_data_base. More...

#include <hkl_data.h>

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

List of all members.

Public Types

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.

Public Member Functions

virtual void init (const HKL_info &hkl_info, const Cell &cell)
 initialiser: from parent hkl_info and cell
virtual void init (const HKL_data_base &hkl_data)
 initialiser: from another hkl_data
virtual void init (const Spacegroup &spacegroup, const Cell &cell, const HKL_sampling &hkl_sampling)
 [CLIPPER2] initialiser: from spacegroup, cell, and HKL_sampling
bool is_null () const
 test if object has been initialised
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)
Range< ftypeinvresolsq_range () const
 get resolution limits of the list (based on true cell and missing data)
int num_obs () const
 get number of observations in this list (based on missing data)
virtual void update ()=0
 update: synchornize info with parent HKL_info
virtual String type () const =0
 get data type (a list of names corresponding to the im/export values)
virtual bool missing (const int &index) const =0
 check if a data entry in the list is marked as 'missing'
virtual void set_null (const int &index)=0
 set data entry in the list to its null value
virtual int data_size () const =0
 return number of data elements in this type
virtual String data_names () const =0
 return names of data elements in this type
virtual void data_export (const HKL &hkl, xtype array[]) const =0
 conversion to array (for I/O)
virtual void data_import (const HKL &hkl, const xtype array[])=0
 conversion from array (for I/O)
virtual void mask (const HKL_data_base &mask)=0
 mask the data by marking any data missing in 'mask' as missing
HKL_reference_index first () const
 return HKL_reference_index pointing to first reflection
HKL_reference_index first_data () const
 return HKL_reference_index pointing to first non-missing data
HKL_reference_indexnext_data (HKL_reference_index &ih) const
 increment HKL_reference_index to next non-missing data
void debug () const

Protected Member Functions

 HKL_data_base ()
 null constructor
virtual ~HKL_data_base ()
 destructor

Protected Attributes

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

HKL_data_base.

This is the virtual base for the typed hkl_data objects. It exists to guarantee and interface by which data can be managed without knowledge of the specific data type.


Constructor & Destructor Documentation

clipper::HKL_data_base::HKL_data_base ( ) [protected]

null constructor

For later initialisation: see init()

References clipper::Message::message().


Member Function Documentation

void clipper::HKL_data_base::init ( const HKL_info hkl_info,
const Cell cell 
) [virtual]

initialiser: from parent hkl_info and cell

Initialise the object using a given reflection list and cell.

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

Reimplemented in clipper::CHKL_data< T >, clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.

References clipper::HKL_info::cell(), cell(), clipper::Cell::equals(), and hkl_info().

Referenced by init().

void clipper::HKL_data_base::init ( const HKL_data_base hkl_data) [virtual]

initialiser: from another hkl_data

Initialise the object using a given reflection list and cell.

Parameters:
hkl_dataObject from which to inherit spacegrpoup, cell, sampling.

Reimplemented in clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.

void clipper::HKL_data_base::init ( const Spacegroup spacegroup,
const Cell cell,
const HKL_sampling hkl_sampling 
) [virtual]

[CLIPPER2] initialiser: from spacegroup, cell, and HKL_sampling

Initialise the object using a given spacegroup, cell, and sampling.

Parameters:
spacegroupThe spacegroup for this datalist.
cellThe unit cell for this datalist.
hkl_samplingThe reflection list description.

Reimplemented in clipper::CHKL_data< T >, clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.

References clipper::ObjectCache< T >::cache(), cacheref, cell(), hkl_sampling(), init(), clipper::HKL_sampling::is_null(), clipper::Cell::is_null(), clipper::Spacegroup::is_null(), clipper::HKL_sampling::resolution(), and spacegroup().

bool clipper::HKL_data_base::is_null ( ) const

test if object has been initialised

Returns:
true if the object has not been initalised.

References clipper::Cell::is_null(), and clipper::HKL_info::is_null().

Referenced by clipper::CHKL_data< T >::update().

ftype clipper::HKL_data_base::invresolsq ( const int &  index) const

get resolution by reflection index (based on true cell)

Return the resolution of a particular reflection. If the cell of this list closely matches (to within 0.5A) the cell of the parent list, this is a simple lookup, otherwise a metric calculation is required.

Reimplemented in clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.

References base_cell(), base_hkl_info(), clipper::HKL_info::hkl_of(), clipper::HKL::invresolsq(), and clipper::HKL_info::invresolsq().

Referenced by clipper::HKL_info::HKL_reference_base::invresolsq(), and invresolsq_range().

Range< ftype > clipper::HKL_data_base::invresolsq_range ( ) const
int clipper::HKL_data_base::num_obs ( ) const

get number of observations in this list (based on missing data)

Returns:
The number of non-missing data in the object.

Reimplemented in clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.

References first_data(), clipper::HKL_info::HKL_reference_index::last(), and next_data().

HKL_info::HKL_reference_index clipper::HKL_data_base::first ( ) const

return HKL_reference_index pointing to first reflection

Returns:
HKL reference to the first data in this object.

Reimplemented in clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.

HKL_info::HKL_reference_index clipper::HKL_data_base::first_data ( ) const

return HKL_reference_index pointing to first non-missing data

Returns:
HKL reference to the first non-missing data in this object.

Reimplemented in clipper::HKL_data< T >, clipper::HKL_data< T1 >, clipper::HKL_data< T2 >, clipper::HKL_data< datatypes::F_sigF< float > >, and clipper::HKL_data< datatypes::ABCD< float > >.

References next_data().

Referenced by clipper::Resolution_ordinal::init(), invresolsq_range(), and num_obs().

HKL_info::HKL_reference_index & clipper::HKL_data_base::next_data ( HKL_info::HKL_reference_index ih) const

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