IMP.bff
Loading...
Searching...
No Matches
Public Member Functions | List of all members
DecayScore Class Reference

Class for scoring model fluorescence decay. More...

#include <DecayScore.h>

Inheritance diagram for DecayScore:
Inheritance graph
Collaboration diagram for DecayScore:
Collaboration graph

Public Member Functions

DecayCurveget_model ()
 
void set_model (DecayCurve *v)
 
DecayCurveget_data ()
 
void set_data (DecayCurve *v)
 
std::vector< double > & get_weighted_residuals ()
 
double get_score (int start=0, int stop=-1, const char *score_type=nullptr)
 
void set_score_type (std::string v)
 
std::string get_score_type ()
 
void set (DecayCurve *model, DecayCurve *data, std::string score_type="poisson", int start=0, int stop=-1)
 
double score (DecayCurve *model=nullptr)
 
 DecayScore (DecayCurve *model=nullptr, DecayCurve *data=nullptr, std::string score_type="poisson", int start=0, int stop=-1)
 Constructs a DecayScore object with the specified model, experimental data, score type, and range of data points.
 
 ~DecayScore () override
 Destroys the DecayScore object and frees any allocated memory.
 
- Public Member Functions inherited from DecayRange
void set_start (int v)
 Set the start index of the decay range.
 
size_t get_start (DecayCurve *d=nullptr) const
 Get the start index of the decay range.
 
void set_stop (int v)
 Set the stop index of the decay range.
 
size_t get_stop (DecayCurve *d=nullptr) const
 Get the stop index of the decay range.
 
void set_range (std::vector< int > v)
 Set the range using a vector of indices.
 
std::vector< int > get_range (DecayCurve *d=nullptr)
 Get the range as a vector of indices.
 
void set (int start=0, int stop=-1)
 Set the start and stop indices of the decay range.
 
 DecayRange (int start, int stop)
 Constructor.
 
virtual ~DecayRange ()=default
 Destructor.
 

Detailed Description

Class for scoring model fluorescence decay.

This class provides functionality for scoring the fluorescence decay of a model against experimental data. It calculates the score based on various scoring types, such as Poisson, Pearson, Gauss, CNP, and SSWR (Sum of Weighted Squared Residuals). The score can be calculated for a specific range of data points.

Constructor & Destructor Documentation

◆ DecayScore()

DecayScore::DecayScore ( DecayCurve model = nullptr,
DecayCurve data = nullptr,
std::string  score_type = "poisson",
int  start = 0,
int  stop = -1 
)

Constructs a DecayScore object with the specified model, experimental data, score type, and range of data points.

Parameters
modelPointer to the model decay curve
dataPointer to the experimental data decay curve
score_typeType of score to calculate (default: "poisson")
startStart index of the range of data points to consider (default: 0)
stopStop index of the range of data points to consider (default: -1, i.e., all points)

◆ ~DecayScore()

DecayScore::~DecayScore ( )
inlineoverride

Destroys the DecayScore object and frees any allocated memory.

Member Function Documentation

◆ get_data()

DecayCurve * DecayScore::get_data ( )

Get the experimental data decay curve.

Returns
Pointer to the experimental data decay curve

◆ get_model()

DecayCurve * DecayScore::get_model ( )

Get the model decay curve.

Returns
Pointer to the model decay curve

◆ get_score()

double DecayScore::get_score ( int  start = 0,
int  stop = -1,
const char *  score_type = nullptr 
)

Calculate the score based on the specified scoring type.

Parameters
startStart index of the range of data points to consider (default: 0)
stopStop index of the range of data points to consider (default: -1, i.e., all points)
score_typeType of score to calculate (default: nullptr, i.e., use the current score type)
Returns
The calculated score

◆ get_score_type()

std::string DecayScore::get_score_type ( )

Get the score type.

Returns
The current score type

◆ get_weighted_residuals()

std::vector< double > & DecayScore::get_weighted_residuals ( )

Get the vector of weighted residuals.

Returns
Reference to the vector of weighted residuals

◆ score()

double DecayScore::score ( DecayCurve model = nullptr)

Evaluate and return the score.

Parameters
modelPointer to the model decay curve (default: nullptr, i.e., use the current model)
Returns
The calculated score

◆ set()

void DecayScore::set ( DecayCurve model,
DecayCurve data,
std::string  score_type = "poisson",
int  start = 0,
int  stop = -1 
)

Set the model and experimental data decay curves, score type, and range of data points.

Parameters
modelPointer to the model decay curve
dataPointer to the experimental data decay curve
score_typeType of score to calculate (default: "poisson")
startStart index of the range of data points to consider (default: 0)
stopStop index of the range of data points to consider (default: -1, i.e., all points)

◆ set_data()

void DecayScore::set_data ( DecayCurve v)

Set the experimental data decay curve.

Parameters
vPointer to the experimental data decay curve

◆ set_model()

void DecayScore::set_model ( DecayCurve v)

Set the model decay curve.

Parameters
vPointer to the model decay curve

◆ set_score_type()

void DecayScore::set_score_type ( std::string  v)

Set the score type.

Parameters
vThe score type to set

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