ProteoWizard
Public Member Functions | Private Attributes | List of all members
pwiz::math::Parabola Class Reference

#include <Parabola.hpp>

Public Member Functions

 Parabola (double a=0, double b=0, double c=0)
 
 Parabola (std::vector< double > a)
 
 Parabola (const std::vector< std::pair< double, double > > &samples)
 
 Parabola (const std::vector< std::pair< double, double > > &samples, const std::vector< double > &weights)
 
std::vector< double > & coefficients ()
 
const std::vector< double > & coefficients () const
 
double operator() (double x) const
 
double center () const
 

Private Attributes

std::vector< double > a_
 

Detailed Description

Definition at line 37 of file Parabola.hpp.

Constructor & Destructor Documentation

◆ Parabola() [1/4]

pwiz::math::Parabola::Parabola ( double  a = 0,
double  b = 0,
double  c = 0 
)

◆ Parabola() [2/4]

pwiz::math::Parabola::Parabola ( std::vector< double >  a)

◆ Parabola() [3/4]

pwiz::math::Parabola::Parabola ( const std::vector< std::pair< double, double > > &  samples)

◆ Parabola() [4/4]

pwiz::math::Parabola::Parabola ( const std::vector< std::pair< double, double > > &  samples,
const std::vector< double > &  weights 
)

Member Function Documentation

◆ coefficients() [1/2]

std::vector<double>& pwiz::math::Parabola::coefficients ( )
inline

Definition at line 52 of file Parabola.hpp.

52 {return a_;}

Referenced by testBasic(), testExactFit(), testLeastSquares(), and testWeightedLeastSquares().

◆ coefficients() [2/2]

const std::vector<double>& pwiz::math::Parabola::coefficients ( ) const
inline

Definition at line 53 of file Parabola.hpp.

53 {return a_;}

◆ operator()()

double pwiz::math::Parabola::operator() ( double  x) const
inline

Definition at line 55 of file Parabola.hpp.

55 {return a_[0]*x*x + a_[1]*x + a_[2];}

References x.

◆ center()

double pwiz::math::Parabola::center ( ) const
inline

Definition at line 56 of file Parabola.hpp.

56 {return -a_[1]/(2*a_[0]);}

Referenced by testExactFit(), testLeastSquares(), and testWeightedLeastSquares().

Member Data Documentation

◆ a_

std::vector<double> pwiz::math::Parabola::a_
private

Definition at line 59 of file Parabola.hpp.


The documentation for this class was generated from the following file:
pwiz::math::Parabola::a_
std::vector< double > a_
Definition: Parabola.hpp:59
x
KernelTraitsBase< Kernel >::space_type::abscissa_type x
Definition: MatchedFilter.hpp:142