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

The DecayPattern class represents a decay pattern with a constant offset and a background pattern. More...

#include <DecayPattern.h>

Inheritance diagram for DecayPattern:
Inheritance graph
Collaboration diagram for DecayPattern:
Collaboration graph

Public Member Functions

double get_pattern_fraction () const
 Get the fraction (area) of the background pattern.
 
void set_pattern_fraction (double v)
 Set the fraction (area) of the background pattern.
 
void set_pattern (DecayCurve *v)
 Set the background pattern.
 
DecayCurveget_pattern ()
 Get the background pattern.
 
void set_constant_offset (double v)
 Set the constant offset in the model.
 
double get_constant_offset () const
 Get the constant offset in the model.
 
void add (DecayCurve *out) override
 Add the background pattern to the given decay curve.
 
 DecayPattern (double constant_offset=0.0, DecayCurve *pattern=nullptr, double pattern_fraction=0.0, int start=0, int stop=-1, bool active=true)
 Constructor for the DecayPattern class.
 
- Public Member Functions inherited from DecayModifier
virtual void set_data (DecayCurve *v)
 
virtual DecayCurveget_data ()
 
bool is_active () const
 
void set_active (bool v)
 
void set (DecayCurve *data, int start=0, int stop=-1, bool active=true)
 
void resize (size_t n, double v=0.0)
 
 DecayModifier (DecayCurve *data=nullptr, int start=0, int stop=-1, bool active=true)
 
 ~DecayModifier ()
 
- 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.
 

Additional Inherited Members

- Protected Attributes inherited from DecayModifier
DecayCurvedata = nullptr
 
DecayCurvedefault_data = nullptr
 

Detailed Description

The DecayPattern class represents a decay pattern with a constant offset and a background pattern.

The DecayPattern class is a subclass of DecayModifier and provides functionality to add a background pattern to a decay curve. It allows setting and retrieving the constant offset and the fraction of the background pattern.

Constructor & Destructor Documentation

◆ DecayPattern()

DecayPattern::DecayPattern ( double  constant_offset = 0.0,
DecayCurve pattern = nullptr,
double  pattern_fraction = 0.0,
int  start = 0,
int  stop = -1,
bool  active = true 
)
explicit

Constructor for the DecayPattern class.

Parameters
constant_offsetThe constant offset in the model (default: 0.0).
patternThe background pattern (default: nullptr).
pattern_fractionThe fraction (area) of the background pattern (default: 0.0).
startThe start index of the decay curve (default: 0).
stopThe stop index of the decay curve (default: -1).
activeThe flag indicating if the DecayPattern is active (default: true).

Member Function Documentation

◆ add()

void DecayPattern::add ( DecayCurve out)
overridevirtual

Add the background pattern to the given decay curve.

Parameters
outThe decay curve to add the background pattern to.

Implements DecayModifier.

◆ get_constant_offset()

double DecayPattern::get_constant_offset ( ) const

Get the constant offset in the model.

Returns
The constant offset in the model.

◆ get_pattern()

DecayCurve * DecayPattern::get_pattern ( )

Get the background pattern.

Returns
The background pattern.

◆ get_pattern_fraction()

double DecayPattern::get_pattern_fraction ( ) const

Get the fraction (area) of the background pattern.

Returns
The fraction (area) of the background pattern.

◆ set_constant_offset()

void DecayPattern::set_constant_offset ( double  v)

Set the constant offset in the model.

Parameters
vThe constant offset to set.

◆ set_pattern()

void DecayPattern::set_pattern ( DecayCurve v)

Set the background pattern.

Parameters
vThe background pattern to set.

◆ set_pattern_fraction()

void DecayPattern::set_pattern_fraction ( double  v)

Set the fraction (area) of the background pattern.

Parameters
vThe fraction (area) of the background pattern to set.

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