Calculator is designed for vector arithmetics, including linear and circular variables like wind directions. For circular variables, input and output are both in degrees. The conversion between degrees and radiance is carried out internally.
More...
#include <Calculator.h>
|
static const double | _DEG2RAD = M_PI / 180 |
|
static const double | _RAD2DEG = 180 / M_PI |
|
Calculator is designed for vector arithmetics, including linear and circular variables like wind directions. For circular variables, input and output are both in degrees. The conversion between degrees and radiance is carried out internally.
◆ Calculator() [1/4]
Calculator::Calculator |
( |
| ) |
|
◆ Calculator() [2/4]
Calculator::Calculator |
( |
bool |
circular | ) |
|
◆ Calculator() [3/4]
Calculator::Calculator |
( |
bool |
, |
|
|
std::size_t |
|
|
) |
| |
◆ Calculator() [4/4]
◆ ~Calculator()
Calculator::~Calculator |
( |
| ) |
|
|
virtual |
◆ clearValues()
void Calculator::clearValues |
( |
| ) |
|
Clear all values in the calculator.
◆ estimatorYamartino_()
double Calculator::estimatorYamartino_ |
( |
| ) |
|
|
protected |
◆ isCircular()
bool Calculator::isCircular |
( |
| ) |
const |
◆ mean()
double Calculator::mean |
( |
| ) |
|
Get the running average of all pushed values.
- Returns
- An average
◆ pushValue()
void Calculator::pushValue |
( |
double |
value | ) |
|
Add a value into the calculation queue
- Parameters
-
◆ reserve()
void Calculator::reserve |
( |
std::size_t |
| ) |
|
Reserve space inside the calculator. This will make adding numbers to the calculator sequence in constant time.
- Parameters
-
The | size of the space to be reserved |
◆ reset()
void Calculator::reset |
( |
| ) |
|
Clear all values and reset the circular status.
◆ sd()
double Calculator::sd |
( |
| ) |
|
Get the running standard deviation of all pushed values
- Returns
- A standard deviation
◆ setCircular()
void Calculator::setCircular |
( |
bool |
circular | ) |
|
Change the circular status of the variable we are calculating.
- Parameters
-
◆ variance()
double Calculator::variance |
( |
| ) |
|
Get the running variance of all pushed values.
- Returns
- A variance
◆ _DEG2RAD
const double Calculator::_DEG2RAD = M_PI / 180 |
|
static |
◆ _RAD2DEG
const double Calculator::_RAD2DEG = 180 / M_PI |
|
static |
◆ circular_
bool Calculator::circular_ |
|
protected |
◆ mean_cos_
double Calculator::mean_cos_ |
|
protected |
◆ mean_linear_
double Calculator::mean_linear_ |
|
protected |
◆ mean_sin_
double Calculator::mean_sin_ |
|
protected |
◆ S_
◆ values_
std::vector<double> Calculator::values_ |
|
protected |
The documentation for this class was generated from the following files: