OpendTect  7.0
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
RockPhysics::Formula Class Reference

A Mathematics formula based on Mnemonics. More...

Inheritance diagram for RockPhysics::Formula:
[legend]

Public Member Functions

 Formula (const Formula &)
 
 Formula (const Mnemonic &, const char *nm=nullptr)
 
 ~Formula ()
 
void fillPar (IOPar &) const
 
MathPropertygetProperty (const PropertyRef *=nullptr) const
 
bool hasPropType (Mnemonic::StdType) const
 
bool hasSameForm (const Math::Formula &) const
 *< Does not use the source More...
 
const char * inputConstantName (int) const
 
Interval< float > inputTypicalRange (int) const
 
bool operator!= (const Formula &) const
 *< Does not use the source More...
 
bool operator== (const Formula &) const
 
void setConstantName (int, const char *)
 
bool setDef (const char *)
 
void setInputTypicalRange (int, const Interval< float > &)
 
void setSource (Repos::Source src)
 
void setText (const char *) override
 
bool usePar (const IOPar &)
 
- Public Member Functions inherited from Math::Formula
 Formula (bool inputsareseries, const SpecVarSet &, const char *txt=nullptr)
 
 Formula (bool inputsareseries=true, const char *txt=nullptr)
 
 Formula (const Formula &)
 
 ~Formula ()
 
void clearAllDefs ()
 
void clearInputDefs ()
 
FormulacopyFrom (const Math::Formula &)
 *< Does not use the description and values More...
 
const char * description () const
 
const char * errMsg () const
 
const Expressionexpression () const
 
void fillPar (IOPar &) const
 
double getConstVal (int) const
 if isConst returns toDouble(inputDef(i)), else Udf More...
 
void getInputMnemonics (MnemonicSelection &) const
 
const TypeSet< int > & getShifts (int iinp) const
 
double getValue (const double *) const
 
double getValue (const double *vals, bool internuns) const
 
float getValue (const float *vals, bool internuns=true) const
 
bool hasFixedUnits () const
 
const char * inputDef (int iinp) const
 
const char * inputDescription (int iinp) const
 
const UnitOfMeasureinputFormUnit (int iinp) const
 
const MnemonicinputMnemonic (int iinp) const
 
bool inputsAreSeries () const
 
const char * inputVar (int iinp) const
 
bool isBad () const
 
bool isCompatibleWith (const Formula &) const
 
bool isCompatibleWith (const Mnemonic &, const MnemonicSelection *inps=nullptr) const
 
bool isConst (int iinp) const
 
bool isOK () const
 
bool isRecursive () const
 
bool isSpec (int iinp) const
 
int maxRecShift () const
 
int nrConsts () const
 
int nrExternalInputs () const
 
int nrInputs () const
 
int nrSpecs () const
 
int nrValues2Provide () const
 
bool operator!= (const Formula &) const
 *< Does not use the description More...
 
Formulaoperator= (const Formula &)
 *< Does not use the description More...
 
bool operator== (const Formula &) const
 
const UnitOfMeasureoutputFormUnit () const
 
const MnemonicoutputMnemonic () const
 
TypeSet< double > & recStartVals ()
 
void setDescription (const char *descstr)
 *< Does not copy input definitions and descriptions More...
 
void setInputDef (int, const char *)
 
void setInputDescription (int, const char *)
 Optional description of an input. More...
 
void setInputFormUnit (int, const UnitOfMeasure *)
 The input unit within the expression. More...
 
void setInputMnemonic (int, const Mnemonic *)
 
void setInputValUnit (int, const UnitOfMeasure *)
 The input unit of incoming values. More...
 
void setOutputFormUnit (const UnitOfMeasure *uom)
 The output unit of the math expression. More...
 
void setOutputMnemonic (const Mnemonic *mn)
 
void setOutputValUnit (const UnitOfMeasure *uom)
 The unit of the returned value (getValue) More...
 
Interval< int > shiftRange (int iinp) const
 
int specIdx (int) const
 
const SpecVarSetspecVars () const
 
void startNewSeries () const
 
const char * text () const
 
void usePar (const IOPar &)
 
const char * userDispText () const
 
const char * variableName (int iinp) const
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
virtual BufferString getName () const
 
bool getNameFromPar (const IOPar &)
 
const name_typename () const override
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
virtual void setName (const char *nm)
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 

Private Member Functions

Formulaoperator= (const Formula &)
 

Static Private Member Functions

static Formulaget (const IOPar &)
 returns null if bad IOPar More...
 

Private Attributes

BufferStringSet constantnms_
 
Repos::Source src_
 
ObjectSet< Interval< float > > typicalrgs_
 

Friends

class ::ElasticFormula
 
class FormulaSet
 

Additional Inherited Members

- Public Types inherited from ObjectWithName
typedef OD::String name_type
 
- Static Public Member Functions inherited from Math::Formula
static const char * sKeyExpression ()
 
static const char * sKeyFileType ()
 
static const char * sKeyRecStartVals ()
 
- Protected Member Functions inherited from Math::Formula
void addShift (int, int, int &, TypeSet< TypeSet< int > > &)
 
int varNameIdx (const char *varnm) const
 
- Protected Attributes inherited from Math::Formula
BufferString desc_
 
BufferString errmsg_
 
Expressionexpr_ = nullptr
 
Threads::Lock formlock_
 
TypeSet< int > inpidxs_
 
ObjectSet< InpDefinps_
 
const bool inputsareseries_
 
const Mnemonicoutputformmn_ = nullptr
 
const UnitOfMeasureoutputformunit_ = nullptr
 
const UnitOfMeasureoutputvalunit_ = nullptr
 
TypeSet< double > prevvals_
 
TypeSet< int > recshifts_
 
TypeSet< double > recstartvals_
 
const SpecVarSetspecvars_
 
BufferString text_
 
TypeSet< int > validxs_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Detailed Description

A Mathematics formula based on Mnemonics.

<>

Constructor & Destructor Documentation

◆ Formula() [1/2]

RockPhysics::Formula::Formula ( const Mnemonic ,
const char *  nm = nullptr 
)

◆ Formula() [2/2]

RockPhysics::Formula::Formula ( const Formula )

◆ ~Formula()

RockPhysics::Formula::~Formula ( )

Member Function Documentation

◆ fillPar()

void RockPhysics::Formula::fillPar ( IOPar ) const

◆ get()

static Formula* RockPhysics::Formula::get ( const IOPar )
staticprivate

returns null if bad IOPar

◆ getProperty()

MathProperty* RockPhysics::Formula::getProperty ( const PropertyRef = nullptr) const

◆ hasPropType()

bool RockPhysics::Formula::hasPropType ( Mnemonic::StdType  ) const

◆ hasSameForm()

bool RockPhysics::Formula::hasSameForm ( const Math::Formula ) const

*< Does not use the source

◆ inputConstantName()

const char* RockPhysics::Formula::inputConstantName ( int  ) const

◆ inputTypicalRange()

Interval<float> RockPhysics::Formula::inputTypicalRange ( int  ) const

◆ operator!=()

bool RockPhysics::Formula::operator!= ( const Formula ) const

*< Does not use the source

◆ operator=()

Formula& RockPhysics::Formula::operator= ( const Formula )
private

◆ operator==()

bool RockPhysics::Formula::operator== ( const Formula ) const

◆ setConstantName()

void RockPhysics::Formula::setConstantName ( int  ,
const char *   
)

◆ setDef()

bool RockPhysics::Formula::setDef ( const char *  )

◆ setInputTypicalRange()

void RockPhysics::Formula::setInputTypicalRange ( int  ,
const Interval< float > &   
)

◆ setSource()

void RockPhysics::Formula::setSource ( Repos::Source  src)
inline

◆ setText()

void RockPhysics::Formula::setText ( const char *  )
overridevirtual

Reimplemented from Math::Formula.

◆ usePar()

bool RockPhysics::Formula::usePar ( const IOPar )

Friends And Related Function Documentation

◆ ::ElasticFormula

friend class ::ElasticFormula
friend

◆ FormulaSet

friend class FormulaSet
friend

Member Data Documentation

◆ constantnms_

BufferStringSet RockPhysics::Formula::constantnms_
private

◆ src_

Repos::Source RockPhysics::Formula::src_
private

◆ typicalrgs_

ObjectSet<Interval<float> > RockPhysics::Formula::typicalrgs_
private

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024