BALL::Spectrum< DataT, PeakT, PositionT > Class Template Reference
[NMR spectra and related classes]

#include <BALL/NMR/spectrum.h>

List of all members.


Public Types

typedef DataT DataType
 

The datatype used to store the spectrum.


typedef PositionT PositionType
 

the data type used to store a position (for peaks and data)


typedef PeakT PeakType
 

The peak type.


typedef DataT::Iterator Iterator
 

An iterator.


typedef DataT::ConstIterator ConstIterator
 

A constant iterator.



Public Member Functions

virtual void clear ()
virtual double difference (const Spectrum< DataT, PeakT, PositionT > &spectrum) const
virtual void setSpacing (const PositionType &spacing)
virtual PositionType getSpacing () const
 Spectrum ()
virtual ~Spectrum ()
Accessors
const DataTypegetData () const
DataTypegetData ()

Protected Attributes

DataType data_
PositionType spacing_
PositionType min_
PositionType max_

Detailed Description

template<typename DataT, typename PeakT, typename PositionT = typename PeakT::Position>
class BALL::Spectrum< DataT, PeakT, PositionT >

A generic NMR spectrum class.


Member Typedef Documentation

template<typename DataT, typename PeakT, typename PositionT = typename PeakT::Position>
typedef DataT::ConstIterator BALL::Spectrum< DataT, PeakT, PositionT >::ConstIterator

A constant iterator.

template<typename DataT, typename PeakT, typename PositionT = typename PeakT::Position>
typedef DataT BALL::Spectrum< DataT, PeakT, PositionT >::DataType

The datatype used to store the spectrum.

Typedefs

template<typename DataT, typename PeakT, typename PositionT = typename PeakT::Position>
typedef DataT::Iterator BALL::Spectrum< DataT, PeakT, PositionT >::Iterator

An iterator.

template<typename DataT, typename PeakT, typename PositionT = typename PeakT::Position>
typedef PeakT BALL::Spectrum< DataT, PeakT, PositionT >::PeakType

The peak type.

template<typename DataT, typename PeakT, typename PositionT = typename PeakT::Position>
typedef PositionT BALL::Spectrum< DataT, PeakT, PositionT >::PositionType

the data type used to store a position (for peaks and data)


Constructor & Destructor Documentation

template<typename DataT, typename PeakT, typename PositionT = typename PeakT::Position>
BALL::Spectrum< DataT, PeakT, PositionT >::Spectrum (  )  [inline]

Constructors and Destructor

template<typename DataT, typename PeakT, typename PositionT = typename PeakT::Position>
virtual BALL::Spectrum< DataT, PeakT, PositionT >::~Spectrum (  )  [inline, virtual]

Member Function Documentation

template<typename DataT , typename PeakT , typename PositionT >
void BALL::Spectrum< DataT, PeakT, PositionT >::clear (  )  [inline, virtual]

Clear the spectrum. Sets all data to zero.

template<typename DataT , typename PeakT , typename PositionT >
double BALL::Spectrum< DataT, PeakT, PositionT >::difference ( const Spectrum< DataT, PeakT, PositionT > &  spectrum  )  const [inline, virtual]

Calculate the difference between two spectra.

Referenced by BALL::operator-().

template<typename DataT, typename PeakT, typename PositionT = typename PeakT::Position>
DataType& BALL::Spectrum< DataT, PeakT, PositionT >::getData (  ) 
template<typename DataT, typename PeakT, typename PositionT = typename PeakT::Position>
const DataType& BALL::Spectrum< DataT, PeakT, PositionT >::getData (  )  const
template<typename DataT , typename PeakT , typename PositionT >
Spectrum< DataT, PeakT, PositionT >::PositionType BALL::Spectrum< DataT, PeakT, PositionT >::getSpacing (  )  const [inline, virtual]

Return the spacing.

References BALL::Spectrum< DataT, PeakT, PositionT >::spacing_.

template<typename DataT, typename PeakT, typename PositionT = typename PeakT::Position>
virtual void BALL::Spectrum< DataT, PeakT, PositionT >::setSpacing ( const PositionType spacing  )  [virtual]

Member Data Documentation

template<typename DataT, typename PeakT, typename PositionT = typename PeakT::Position>
DataType BALL::Spectrum< DataT, PeakT, PositionT >::data_ [protected]
template<typename DataT, typename PeakT, typename PositionT = typename PeakT::Position>
PositionType BALL::Spectrum< DataT, PeakT, PositionT >::max_ [protected]
template<typename DataT, typename PeakT, typename PositionT = typename PeakT::Position>
PositionType BALL::Spectrum< DataT, PeakT, PositionT >::min_ [protected]
template<typename DataT, typename PeakT, typename PositionT = typename PeakT::Position>
PositionType BALL::Spectrum< DataT, PeakT, PositionT >::spacing_ [protected]