yat  0.20.3pre
Public Member Functions | Related Functions | List of all members
theplu::yat::statistics::Smoother Class Reference

Estimating a distribution in a smooth fashion. More...

#include <yat/statistics/Smoother.h>

Public Member Functions

 Smoother (const regression::Kernel &, double width, const std::vector< double > &values)
 
 Smoother (const regression::Kernel &kernel, double width, double xmin, double xmax, size_t n)
 
void add (double x, double weight=1.0)
 Add a data point.
 
const std::vector< double > & density (void) const
 estimated values
 
void rescale (double factor)
 
void reset (void)
 reset density to zero
 
const std::vector< double > & value (void) const
 values in which distribution is estimated
 

Related Functions

(Note that these are not member functions.)

template<typename Iterator >
void add (Smoother &h, Iterator first, Iterator last)
 
std::ostream & operator<< (std::ostream &s, const Smoother &)
 

Detailed Description

Estimating a distribution in a smooth fashion.

Since
New in yat 0.5

Constructor & Destructor Documentation

◆ Smoother() [1/2]

theplu::yat::statistics::Smoother::Smoother ( const regression::Kernel ,
double  width,
const std::vector< double > &  values 
)

Constructor taking vector describing for which values distribution should be estimated.

Note
if values are not sorted the behavior is undefined

◆ Smoother() [2/2]

theplu::yat::statistics::Smoother::Smoother ( const regression::Kernel kernel,
double  width,
double  xmin,
double  xmax,
size_t  n 
)

Constructor creating observation points equally distributed between xmin and xmax.

Parameters
kerneldoing the smoothing
width
xminsmallest observation point
xmaxlargest observation point
nnumber of observation points

Member Function Documentation

◆ rescale()

void theplu::yat::statistics::Smoother::rescale ( double  factor)

multiply each value with factor

Since
New in yat 0.6

Friends And Related Function Documentation

◆ add()

template<typename Iterator >
void add ( Smoother h,
Iterator  first,
Iterator  last 
)
related

Add a range [first, last) of values to Smoother.

Type Requirements:

◆ operator<<()

std::ostream & operator<< ( std::ostream &  s,
const Smoother  
)
related

The Smoother output operator


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

Generated on Sat Feb 18 2023 03:31:45 for yat by  doxygen 1.8.14