Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

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

A generic NMR spectrum class. More...

#include <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 ()
 Clear the spectrum.
virtual double difference (const Spectrum< DataT, PeakT, PositionT > &spectrum) const
 Calculate the difference between two spectra.
virtual void setSpacing (const PositionType &spacing)
virtual PositionType getSpacing () const
 Return the spacing.
Accessors
const DataTypegetData () const throw ()
DataTypegetData () throw ()

Protected Attributes

DataType data_
PositionType spacing_
PositionType min_
PositionType max_


Detailed Description

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

A generic NMR spectrum class.


Member Function Documentation

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

Clear the spectrum.

Sets all data to zero.

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

Calculate the difference between two spectra.

template<typename DataT, typename PeakT, typename PositionT>
Spectrum< DataT, PeakT, PositionT >::PositionType Spectrum< DataT, PeakT, PositionT >::getSpacing  )  const [virtual]
 

Return the spacing.