ProteoWizard
Public Types | Public Member Functions | Public Attributes | List of all members
pwiz::math::MatchedFilter::SampledData< space_type > Struct Template Reference

#include <MatchedFilter.hpp>

Public Types

typedef space_type::abscissa_type abscissa_type
 
typedef space_type::ordinate_type ordinate_type
 
typedef std::pair
< abscissa_type, abscissa_type
domain_type
 
typedef std::vector
< ordinate_type
samples_type
 

Public Member Functions

abscissa_type domainWidth () const
 
abscissa_type dx () const
 
abscissa_type x (typename samples_type::size_type index) const
 
samples_type::size_type sampleIndex (const abscissa_type &x) const
 
const ordinate_typesample (abscissa_type x) const
 

Public Attributes

domain_type domain
 
samples_type samples
 

Detailed Description

template<typename space_type>
struct pwiz::math::MatchedFilter::SampledData< space_type >

Definition at line 55 of file MatchedFilter.hpp.

Member Typedef Documentation

template<typename space_type>
typedef space_type::abscissa_type pwiz::math::MatchedFilter::SampledData< space_type >::abscissa_type

Definition at line 57 of file MatchedFilter.hpp.

template<typename space_type>
typedef space_type::ordinate_type pwiz::math::MatchedFilter::SampledData< space_type >::ordinate_type

Definition at line 58 of file MatchedFilter.hpp.

template<typename space_type>
typedef std::pair<abscissa_type,abscissa_type> pwiz::math::MatchedFilter::SampledData< space_type >::domain_type

Definition at line 59 of file MatchedFilter.hpp.

template<typename space_type>
typedef std::vector<ordinate_type> pwiz::math::MatchedFilter::SampledData< space_type >::samples_type

Definition at line 60 of file MatchedFilter.hpp.

Member Function Documentation

template<typename space_type>
abscissa_type pwiz::math::MatchedFilter::SampledData< space_type >::domainWidth ( ) const
inline
template<typename space_type>
abscissa_type pwiz::math::MatchedFilter::SampledData< space_type >::dx ( ) const
inline
template<typename space_type>
abscissa_type pwiz::math::MatchedFilter::SampledData< space_type >::x ( typename samples_type::size_type  index) const
inline
template<typename space_type>
samples_type::size_type pwiz::math::MatchedFilter::SampledData< space_type >::sampleIndex ( const abscissa_type x) const
inline

Definition at line 80 of file MatchedFilter.hpp.

References pwiz::math::MatchedFilter::SampledData< space_type >::domain, pwiz::math::MatchedFilter::SampledData< space_type >::domainWidth(), and pwiz::math::MatchedFilter::SampledData< space_type >::samples.

Referenced by pwiz::math::MatchedFilter::SampledData< space_type >::sample().

81  {
82  typename samples_type::size_type sampleCount = samples.size();
83  int result = (int)round((sampleCount-1)*(x-domain.first)/domainWidth());
84  if (result < 0) result = 0;
85  if (result > (int)(sampleCount-1)) result = sampleCount-1;
86  return (typename samples_type::size_type)(result);
87  }
abscissa_type x(typename samples_type::size_type index) const
template<typename space_type>
const ordinate_type& pwiz::math::MatchedFilter::SampledData< space_type >::sample ( abscissa_type  x) const
inline

Definition at line 89 of file MatchedFilter.hpp.

References pwiz::math::MatchedFilter::SampledData< space_type >::sampleIndex(), and pwiz::math::MatchedFilter::SampledData< space_type >::samples.

90  {
91  return samples[sampleIndex(x)];
92  }
abscissa_type x(typename samples_type::size_type index) const
samples_type::size_type sampleIndex(const abscissa_type &x) const

Member Data Documentation

template<typename space_type>
domain_type pwiz::math::MatchedFilter::SampledData< space_type >::domain
template<typename space_type>
samples_type pwiz::math::MatchedFilter::SampledData< space_type >::samples

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