1.8.0
CCC
 
Loading...
Searching...
No Matches
Getting and Setting functions by Locator

Functions

Id gstlrn::Db::getNLoc (const ELoc &loctype) const
 
bool gstlrn::Db::hasLocVariable (const ELoc &loctype) const
 
double gstlrn::Db::getLocVariable (const ELoc &loctype, Id iech, Id item) const
 
void gstlrn::Db::setLocVariable (const ELoc &loctype, Id iech, Id item, double value)
 
void gstlrn::Db::updLocVariable (const ELoc &loctype, Id iech, Id item, const EOperator &oper, double value)
 

Detailed Description

Various functions for accessing fields of the Db using the locator designation. They use the argument 'loctype' which refers to the Locator type (see ELoc enumeration). In most cases, they also refer to 'item' i.e. the rank (0 based) for the target locator.

Parameters
loctypeTarget locator
iechTarget sample (0 based)
itemRank of the 'loctype' locator (0 based)
operType of operation
  • 0 : New = New + Old
  • 1 : New = New * Old
  • 2 : New = New - Old
  • 3 : New = Old / New
  • 4 : New = New (only if old is defined)
  • 5 : New = MAX(New, Old)
  • 6 : New = MIN(New, Old)
valueAssigned value

Function Documentation

◆ getLocVariable()

double gstlrn::Db::getLocVariable ( const ELoc &  loctype,
Id  iech,
Id  item 
) const

Get the value of the field corresponding to the target locator (and its target item) at the target sample

Returns
Returned value

◆ getNLoc()

Id gstlrn::Db::getNLoc ( const ELoc &  loctype) const

Returns the number of fields corresponding to the target locator present in the Db

Returns
Number of fields

◆ hasLocVariable()

bool gstlrn::Db::hasLocVariable ( const ELoc &  loctype) const

Check if there is at least one field corresponding to the target locator

Returns
TRUE if at least one field corresponds to 'loctype' locator; FALSE otherwise

◆ setLocVariable()

void gstlrn::Db::setLocVariable ( const ELoc &  loctype,
Id  iech,
Id  item,
double  value 
)

Set the value of the field corresponding to the target locator (and its target item) at the target sample

◆ updLocVariable()

void gstlrn::Db::updLocVariable ( const ELoc &  loctype,
Id  iech,
Id  item,
const EOperator &  oper,
double  value 
)

Update the value of the field corresponding to the target locator (and its target item) at the target sample