|
reconciliation_lib 0.1
Library for data reconciliation algorithms
|
Encapsulates a system to be reconciled, including variables, confidence intervals, covariance coefficient, etc. More...
#include <recon_system.h>
Classes | |
| struct | extra_cov |
| struct | var |
Public Member Functions | |
| void | add_var (const char *name, double val, double confint) |
| Add a variable to be reconciled to the system. | |
| void | add_covariance_coeff (const char *name1, const char *name2, double cov_coeff) |
| Register a covariance coefficient between two variables. | |
| int | find_var (const std::string &str) const |
| Return the index of a variable by name, or -1 if not found. | |
| void | change_var (const char *name, double val, double confint) |
| Update the measured value and confidence interval of an existing variable. | |
| int | get_number_measured () const |
Return the number of variables that have measurements (non-negative confint). | |
| matrix | get_covariance_matrix () const |
| Build and return the full covariance matrix from the registered variables and covariance coefficients. | |
| vector | get_values () const |
| Return a vector of all variable values in registration order. | |
| recon_system | updated (const vector &values, const vector &confints) const |
Return a new recon_system with updated values and confidence intervals. | |
| void | print_vars () const |
| Print all variables with their values and confidence intervals to stdout. | |
| void | print_constraints (const matrix &F) const |
Print the constraint matrix F together with variable names to stdout. | |
Private Attributes | |
| std::vector< var > | vars |
| std::vector< extra_cov > | extra_covs |
Encapsulates a system to be reconciled, including variables, confidence intervals, covariance coefficient, etc.
Constraints still need to be implemented. Also, fixed variables should be treated here.
| void dvrlib::recon_system::add_covariance_coeff | ( | const char * | name1, |
| const char * | name2, | ||
| double | cov_coeff | ||
| ) |
Register a covariance coefficient between two variables.
The coefficient is used when building the covariance matrix via get_covariance_matrix().
| [in] | name1 | Name of the first variable. |
| [in] | name2 | Name of the second variable. |
| [in] | cov_coeff | Covariance coefficient (fraction of the geometric mean of the two variances). |
Add a variable to be reconciled to the system.
If confint is negative, it is assumed that this variable is free (i.e., no measurements).
confint is zero it is assumed that this variable is fixed.| [in] | name | The name of the variable |
| [in] | val | The measured, estimated of fixed value of the variable |
| [in] | confint | The confidence interval |
Update the measured value and confidence interval of an existing variable.
| [in] | name | Name of the variable to update. |
| [in] | val | New measured value. |
| [in] | confint | New confidence interval. |
Return the index of a variable by name, or -1 if not found.
| [in] | str | Variable name to search for. |
| matrix dvrlib::recon_system::get_covariance_matrix | ( | ) | const |
Build and return the full covariance matrix from the registered variables and covariance coefficients.
| int dvrlib::recon_system::get_number_measured | ( | ) | const |
Return the number of variables that have measurements (non-negative confint).
| vector dvrlib::recon_system::get_values | ( | ) | const |
Return a vector of all variable values in registration order.
Print the constraint matrix F together with variable names to stdout.
| [in] | F | Constraint (Jacobian) matrix whose columns correspond to the variables in this system. |
| void dvrlib::recon_system::print_vars | ( | ) | const |
Print all variables with their values and confidence intervals to stdout.
| recon_system dvrlib::recon_system::updated | ( | const vector & | values, |
| const vector & | confints | ||
| ) | const |
Return a new recon_system with updated values and confidence intervals.
Keeps all variable names and covariance coefficients; replaces values and confidence intervals from the supplied vectors.
| [in] | values | New variable values (one per variable, in order). |
| [in] | confints | New confidence intervals (one per variable, in order). |
|
private |
|
private |