Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

BinnedRep Class Reference

#include <OpenMS/COMPARISON/CLUSTERING/BinnedRep.h>

List of all members.


Detailed Description

Binned Representation of a PeakSpectrum (stick spectrum).

Bin Dimensions:
BinSize = size of the bins
BinSpread > 0 adds peaks to more bins
expample:
spread 0: | => #
spread 1: | => ###
spread 2: | =? #####
since small binsizes tend to produce very sparse Vectors ( < 1%) a sparse Vector is used

Public Types

typedef
SparseVector::const_iterator 
const_iterator
typedef SparseVector::iterator iterator
typedef
SparseVector::const_iterator 
ConstIterator
typedef SparseVector::iterator Iterator

Public Member Functions

void normalize ()
 scale all peaks from 0 to 1
Constructors and destructors
 BinnedRep ()
 default constructor
 BinnedRep (double, uint=0)
 detailed constructor with declaration of bin dimensions
 BinnedRep (const PeakSpectrum &spec, double binsize=1.0, uint binspread=0)
 detailed constructor with PeakSpectrum and bin settings
 BinnedRep (const BinnedRep &source)
 copy constructor
virtual ~BinnedRep ()
 destructor
Accessors
BinnedRepoperator= (const BinnedRep &source)
 assignment operator
uint id () const
 returns the id of the spectrum
double getBinSize () const
 returns the bin size of the spectrum
double max () const
 returns the maximum of the m/z values
double min () const
 returns the minimum of the m/z values
double getRT () const
 returns the retention time
unsigned int getBinSpread () const
 returns the spreading of the bins
double getParentmz () const
 returns the mass-to-charge ratio of the parent ion
unsigned int getPrecursorPeakCharge () const
 returns the charge of the parent ion
unsigned int size () const
 returns the number of bins
String str () const
 converts it to a string
Iterator begin ()
 returns an iterator pointing at the first bin
Iterator end ()
 returns an end iterator
ConstIterator begin () const
 returns an constant begin iterator
ConstIterator end () const
 returns an constant end Iterator
intensity operator[] (int) const
 access to a bin with bracket operator

Private Member Functions

void clear_ ()
 clears all data

Private Attributes

SparseVector bins_
 sparse vector containing the summed intensity

double binsize_
 size of the bins
unsigned int spread_
 spreading of the bins
double begin_
 first m/z
double end_
 last m/z
unsigned int id_
 the spectrum id
double retention_
 retention time of the spectrum
double parent_m_z_
 the m/z of the parent ion
unsigned int precursorpeakcharge_
 charge of the parent ion

Friends

void operator<< (BinnedRep &bin_rep, const PeakSpectrum &spec)
 fill bins with stick spectrum


Member Typedef Documentation

typedef SparseVector::const_iterator const_iterator

typedef SparseVector::iterator iterator

typedef SparseVector::const_iterator ConstIterator

typedef SparseVector::iterator Iterator


Constructor & Destructor Documentation

BinnedRep (  ) 

default constructor

BinnedRep ( double  ,
uint  = 0 
)

detailed constructor with declaration of bin dimensions

BinnedRep ( const PeakSpectrum spec,
double  binsize = 1.0,
uint  binspread = 0 
)

detailed constructor with PeakSpectrum and bin settings

BinnedRep ( const BinnedRep source  ) 

copy constructor

virtual ~BinnedRep (  )  [virtual]

destructor


Member Function Documentation

BinnedRep& operator= ( const BinnedRep source  ) 

assignment operator

uint id (  )  const [inline]

returns the id of the spectrum

double getBinSize (  )  const [inline]

returns the bin size of the spectrum

double max (  )  const [inline]

returns the maximum of the m/z values

double min (  )  const [inline]

returns the minimum of the m/z values

double getRT (  )  const [inline]

returns the retention time

unsigned int getBinSpread (  )  const [inline]

returns the spreading of the bins

double getParentmz (  )  const [inline]

returns the mass-to-charge ratio of the parent ion

unsigned int getPrecursorPeakCharge (  )  const [inline]

returns the charge of the parent ion

unsigned int size (  )  const [inline]

returns the number of bins

String str (  )  const

converts it to a string

Iterator begin (  )  [inline]

returns an iterator pointing at the first bin

Iterator end (  )  [inline]

returns an end iterator

ConstIterator begin (  )  const [inline]

returns an constant begin iterator

ConstIterator end (  )  const [inline]

returns an constant end Iterator

intensity operator[] ( int   )  const

access to a bin with bracket operator

void normalize (  ) 

scale all peaks from 0 to 1

void clear_ (  )  [private]

clears all data


Friends And Related Function Documentation

void operator<< ( BinnedRep bin_rep,
const PeakSpectrum spec 
) [friend]

fill bins with stick spectrum


Member Data Documentation

SparseVector bins_ [private]

sparse vector containing the summed intensity

double binsize_ [private]

size of the bins

unsigned int spread_ [private]

spreading of the bins

double begin_ [private]

first m/z

double end_ [private]

last m/z

unsigned int id_ [private]

the spectrum id

double retention_ [private]

retention time of the spectrum

double parent_m_z_ [private]

the m/z of the parent ion

unsigned int precursorpeakcharge_ [private]

charge of the parent ion


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:43 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1