musrWiz 0.1.0
Loading...
Searching...
No Matches
PMusrfitFunc Class Reference

The PMusrfitFunc class represents a musrfit theory function. More...

#include <PMusrfitFunc.h>

Public Member Functions

 PMusrfitFunc ()
 Constructor. Initializes to default values.
 
 ~PMusrfitFunc ()
 Destructor.
 
void initFunc ()
 Initializes all member variables to default values.
 
void setName (QString name)
 Sets the function name.
 
void setAbbrv (QString abbrv)
 Sets the function abbreviation.
 
void setNoOfParam (int ival)
 Sets the number of parameters this function takes.
 
void addFuncParam (PFuncParam param)
 Adds a parameter definition to this function.
 
QString getName ()
 Returns the function name.
 
QString getAbbrv ()
 Returns the function abbreviation.
 
int getNoOfParam ()
 Returns the number of parameters.
 
PFuncParam getFuncParam (int idx)
 Returns a function parameter by index.
 
QVector< PFuncParam > * getFuncParams ()
 Returns a pointer to the parameter vector.
 

Private Attributes

QString fName
 full function name
 
QString fAbbrv
 abbreviation for msr-files
 
int fNoOfParam
 number of parameters
 
QVector< PFuncParamfParam
 parameter definitions
 

Detailed Description

The PMusrfitFunc class represents a musrfit theory function.

This class holds the definition of a musrfit theory function including its full name, abbreviation (used in msr-files), number of parameters, and the parameter definitions. Examples include simpleGss (sg), simpleLor (sl), TFieldCos (tf), etc.

Constructor & Destructor Documentation

◆ PMusrfitFunc()

PMusrfitFunc::PMusrfitFunc ( )
inline

Constructor. Initializes to default values.

◆ ~PMusrfitFunc()

PMusrfitFunc::~PMusrfitFunc ( )
inline

Destructor.

Member Function Documentation

◆ addFuncParam()

void PMusrfitFunc::addFuncParam ( PFuncParam param)
inline

Adds a parameter definition to this function.

Parameters
paramParameter object to add.

◆ getAbbrv()

QString PMusrfitFunc::getAbbrv ( )
inline

Returns the function abbreviation.

Returns
Abbreviation string.

◆ getFuncParam()

PFuncParam PMusrfitFunc::getFuncParam ( int idx)

Returns a function parameter by index.

PMusrfitFunc::getFuncParam returns a function parameter by index.

Parameters
idxIndex of the parameter.
Returns
PFuncParam at the given index, or default param if out of range.
Parameters
idxIndex of the parameter (0-based).
Returns
PFuncParam at the given index, or an empty/default parameter if index is out of range.

◆ getFuncParams()

QVector< PFuncParam > * PMusrfitFunc::getFuncParams ( )
inline

Returns a pointer to the parameter vector.

Returns
Pointer to the QVector of PFuncParam.

◆ getName()

QString PMusrfitFunc::getName ( )
inline

Returns the function name.

Returns
Full function name.

◆ getNoOfParam()

int PMusrfitFunc::getNoOfParam ( )
inline

Returns the number of parameters.

Returns
Number of parameters.

◆ initFunc()

void PMusrfitFunc::initFunc ( )

Initializes all member variables to default values.

PMusrfitFunc::initFunc initializes all member variables to default values.

Sets name and abbreviation to "UnDef", number of parameters to -1, and clears the parameter list.

◆ setAbbrv()

void PMusrfitFunc::setAbbrv ( QString abbrv)
inline

Sets the function abbreviation.

Parameters
abbrvAbbreviation used in msr-files (e.g., "sg").

◆ setName()

void PMusrfitFunc::setName ( QString name)
inline

Sets the function name.

Parameters
nameFull function name (e.g., "simpleGss").

◆ setNoOfParam()

void PMusrfitFunc::setNoOfParam ( int ival)
inline

Sets the number of parameters this function takes.

Parameters
ivalNumber of parameters.

Member Data Documentation

◆ fAbbrv

QString PMusrfitFunc::fAbbrv
private

abbreviation for msr-files

◆ fName

QString PMusrfitFunc::fName
private

full function name

◆ fNoOfParam

int PMusrfitFunc::fNoOfParam
private

number of parameters

◆ fParam

QVector<PFuncParam> PMusrfitFunc::fParam
private

parameter definitions


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