WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
WXP::DataMath Class Reference

This class does math on raw point data. More...

#include "../include/DataMath.h"

Static Public Member Functions

static int units (Data &data, int fld, const char *units)
 
static int units (Data &data, const char *units)
 
static int uniqueId (Data &odata, Data &idata)
 
static int removeMiss (Data &odata, Data &idata)
 
static int max (Data &odata, Data &dataa, int flda, Data &datab, int fldb)
 
static int max (Data &odata, Data &dataa, Data &datab)
 
static int max (Data &odata, Data &idata, int ifld)
 
static int max (Data &odata, Data &idata)
 
static int min (Data &odata, Data &dataa, int flda, Data &datab, int fldb)
 
static int min (Data &odata, Data &dataa, Data &datab)
 
static int min (Data &odata, Data &idata, int ifld)
 
static int min (Data &odata, Data &idata)
 
static int add (Data &odata, Data &dataa, int flda, Data &datab, int fldb)
 
static int add (Data &odata, Data &dataa, Data &datab)
 
static int add (Data &odata, Data &idata, int ifld)
 
static int add (Data &odata, Data &idata)
 
static int diff (Data &odata, Data &dataa, int flda, Data &datab, int fldb)
 
static int diff (Data &odata, Data &dataa, Data &datab)
 
static int replace (Data &data, int fld, float old, float val)
 
static int replace (Data &data, float old, float val)
 
static int offset (Data &data, int fld, float offset)
 
static int offset (Data &data, float offset)
 
static int scale (Data &data, int fld, float scale)
 
static int scale (Data &data, float scale)
 
static int removeValid (Data &odata, Data &data, int min)
 
static int average (Data &odata, Data &data)
 
static int cutoff (Data &odata, const char *cmd, float cutoff, float nval, Data &idata, int fld)
 

Detailed Description

This class does math on raw point data.

Author
Dan Vietor

Member Function Documentation

◆ add() [1/2]

int DataMath::add ( Data odata,
Data dataa,
int  flda,
Data datab,
int  fldb 
)
static

Adds two data arrays. Creates two fields: output and valid

Return values
odataOutput data array
Parameters
dataaFirst data array
fldaField in first data array
databSecond data array
fldbField in second data array

References WXP::Data::getId(), WXP::Data::getIndex(), and WXP::Const::MISS.

◆ add() [2/2]

int DataMath::add ( Data odata,
Data idata,
int  ifld 
)
static

Adds two data arrays. O = O + I

Return values
odataOutput data array
Parameters
idataInput data array

References WXP::Data::getId(), WXP::Data::getIndex(), and WXP::Const::MISS.

◆ average()

int DataMath::average ( Data odata,
Data data 
)
static

Averages data

Return values
odataOutput data
Parameters
dataInput data, output of add

References WXP::StrLib::equal(), WXP::Data::getId(), and WXP::Const::MISS.

◆ cutoff()

int DataMath::cutoff ( Data odata,
const char *  cmd,
float  cutoff,
float  nval,
Data idata,
int  fld 
)
static

Cuts off values in a data. This would make all values lower than a cutoff to nval

Return values
odataOutput data
Parameters
cmdCommand (lower, higher)
cutoffCutoff value
nvalNew value to set data to
idataData to use
fldField to use

References cutoff(), WXP::StrLib::equal(), WXP::Data::getId(), and WXP::Const::MISS.

Referenced by cutoff().

◆ diff()

int DataMath::diff ( Data odata,
Data dataa,
int  flda,
Data datab,
int  fldb 
)
static

Subtracts two data arrays.

Return values
odataOutput data array
Parameters
dataaFirst data array
fldaField in first data array
databSecond data array
fldbField in second data array

References WXP::Data::getId(), WXP::Data::getIndex(), and WXP::Const::MISS.

◆ max() [1/2]

int DataMath::max ( Data odata,
Data dataa,
int  flda,
Data datab,
int  fldb 
)
static

Finds the maximum of two data arrays. Creates two fields: output and valid

Return values
odataOutput data array
Parameters
dataaFirst data array
fldaField in first data array
databSecond data array
fldbField in second data array

References WXP::Data::getId(), WXP::Data::getIndex(), and WXP::Const::MISS.

◆ max() [2/2]

int DataMath::max ( Data odata,
Data idata,
int  ifld 
)
static

Finds the maximum of two data arrays. O = O <> I

Return values
odataOutput data array
Parameters
idataInput data array

References WXP::Data::getId(), WXP::Data::getIndex(), and WXP::Const::MISS.

◆ min() [1/2]

int DataMath::min ( Data odata,
Data dataa,
int  flda,
Data datab,
int  fldb 
)
static

Finds the minimum of two data arrays. Creates two fields: output and valid

Return values
odataOutput data array
Parameters
dataaFirst data array
fldaField in first data array
databSecond data array
fldbField in second data array

References WXP::Data::getId(), WXP::Data::getIndex(), and WXP::Const::MISS.

Referenced by removeValid().

◆ min() [2/2]

int DataMath::min ( Data odata,
Data idata,
int  ifld 
)
static

Finds the minimum of two data arrays. O = O <> I

Return values
odataOutput data array
Parameters
idataInput data array

References WXP::Data::getId(), WXP::Data::getIndex(), and WXP::Const::MISS.

◆ offset()

int DataMath::offset ( Data data,
int  fld,
float  off 
)
static

Offset data values

Return values
dataData
Parameters
fldField number
offOffset value

References WXP::Const::MISS.

◆ removeMiss()

int DataMath::removeMiss ( Data odata,
Data idata 
)
static

Removes entries with missing values

Parameters
odataOutput data
idataInput data
Returns
Number of entries removed

References WXP::Const::MISS.

◆ removeValid()

int DataMath::removeValid ( Data odata,
Data data,
int  min 
)
static

Removes points that don't make valid count

Return values
odataOutput data
Parameters
dataInput data
minMinimum valid count to be put in output

References WXP::StrLib::equal(), WXP::Data::getId(), and min().

◆ replace()

int DataMath::replace ( Data data,
int  fld,
float  old,
float  val 
)
static

Replace data values

Return values
dataData
Parameters
fldField number
oldValue to replace
valNew value

◆ scale()

int DataMath::scale ( Data data,
int  fld,
float  scale 
)
static

Scales data values

Return values
dataData
Parameters
fldField number
scaleScale value

References WXP::Const::MISS, and scale().

Referenced by scale().

◆ uniqueId()

int DataMath::uniqueId ( Data odata,
Data idata 
)
static

Removes duplicate entries by identifier

Parameters
odataOutput data
idataInput data
Returns
Number of duplicates

References WXP::Hash::enter(), WXP::Data::getId(), WXP::Wxp::isDebug(), and WXP::Hash::searchBool().

◆ units() [1/2]

int DataMath::units ( Data data,
const char *  runits 
)
static

Changes the units of a data (field 0)

Parameters
dataData to change
runitsNew units (C to F, ft to m)

References units().

◆ units() [2/2]

int DataMath::units ( Data data,
int  fld,
const char *  runits 
)
static

Changes the units of a data

Parameters
dataData to change
fldIndex of field
runitsNew units (C to F, ft to m)

References WXP::Unit::convert(), and WXP::Unit::equal().

Referenced by units().


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