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

#include <MatchedFilter.hpp>

List of all members.

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().

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

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: