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_typedomain_type
 
typedef std::vector< ordinate_typesamples_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

◆ abscissa_type

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.

◆ ordinate_type

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.

◆ domain_type

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.

◆ samples_type

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

◆ domainWidth()

template<typename space_type >
abscissa_type pwiz::math::MatchedFilter::SampledData< space_type >::domainWidth ( ) const
inline

◆ dx()

template<typename space_type >
abscissa_type pwiz::math::MatchedFilter::SampledData< space_type >::dx ( ) const
inline

◆ x()

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

◆ sampleIndex()

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.

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  }

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

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

◆ sample()

template<typename space_type >
const ordinate_type& pwiz::math::MatchedFilter::SampledData< space_type >::sample ( abscissa_type  x) const
inline

Member Data Documentation

◆ domain

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

◆ samples

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

The documentation for this struct was generated from the following file:
pwiz::math::MatchedFilter::SampledData::sampleIndex
samples_type::size_type sampleIndex(const abscissa_type &x) const
Definition: MatchedFilter.hpp:80
pwiz::math::MatchedFilter::SampledData::x
abscissa_type x(typename samples_type::size_type index) const
Definition: MatchedFilter.hpp:75
pwiz::math::MatchedFilter::SampledData::domain
domain_type domain
Definition: MatchedFilter.hpp:62
pwiz::math::MatchedFilter::SampledData::domainWidth
abscissa_type domainWidth() const
Definition: MatchedFilter.hpp:65
pwiz::math::MatchedFilter::SampledData::samples
samples_type samples
Definition: MatchedFilter.hpp:63