BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ChiSquaredModule Class Reference

Description

Calculation of chi2 between two data sets.

Inheritance diagram for ChiSquaredModule:

Public Member Functions

 ChiSquaredModule ()=default
 
 ChiSquaredModule (const ChiSquaredModule &other)=default
 
 ~ChiSquaredModule () override=default
 
ChiSquaredModuleclone () const override
 clone method More...
 
virtual const IIntensityFunctiongetIntensityFunction () const
 Returns data rescaler. More...
 
double residual (double a, double b, double weight) override
 
virtual void setIntensityFunction (const IIntensityFunction &intensity_function)
 Sets data rescaler. More...
 
void setVarianceFunction (const IVarianceFunction &variance_function)
 Sets squared function. More...
 
const IVarianceFunction * varianceFunction () const
 Returns squared function. More...
 

Protected Attributes

std::unique_ptr< IIntensityFunctionm_intensity_function
 
std::unique_ptr< IVarianceFunction > m_variance_function
 

Constructor & Destructor Documentation

◆ ChiSquaredModule() [1/2]

ChiSquaredModule::ChiSquaredModule ( )
default

◆ ChiSquaredModule() [2/2]

ChiSquaredModule::ChiSquaredModule ( const ChiSquaredModule other)
default

◆ ~ChiSquaredModule()

ChiSquaredModule::~ChiSquaredModule ( )
overridedefault

Member Function Documentation

◆ clone()

ChiSquaredModule* ChiSquaredModule::clone ( ) const
overridevirtual

clone method

Implements IChiSquaredModule.

◆ getIntensityFunction()

virtual const IIntensityFunction* IChiSquaredModule::getIntensityFunction ( ) const
virtualinherited

Returns data rescaler.

◆ residual()

double ChiSquaredModule::residual ( double  a,
double  b,
double  weight 
)
overridevirtual

Implements IChiSquaredModule.

◆ setIntensityFunction()

virtual void IChiSquaredModule::setIntensityFunction ( const IIntensityFunction intensity_function)
virtualinherited

Sets data rescaler.

◆ setVarianceFunction()

void IChiSquaredModule::setVarianceFunction ( const IVarianceFunction &  variance_function)
inherited

Sets squared function.

◆ varianceFunction()

const IVarianceFunction* IChiSquaredModule::varianceFunction ( ) const
inherited

Returns squared function.

Member Data Documentation

◆ m_intensity_function

std::unique_ptr<IIntensityFunction> IChiSquaredModule::m_intensity_function
protectedinherited

◆ m_variance_function

std::unique_ptr<IVarianceFunction> IChiSquaredModule::m_variance_function
protectedinherited