1#ifndef DVRLIB_RECON_SYSTEM_H
2#define DVRLIB_RECON_SYSTEM_H
42 void add_var(
const char* name,
double val,
double confint);
72 void change_var(
const char* name,
double val,
double confint);
RAII wrapper around a heap-allocated gsl_matrix.
Definition gsl_wrapper.h:149
Encapsulates a system to be reconciled, including variables, confidence intervals,...
Definition recon_system.h:16
std::vector< var > vars
Definition recon_system.h:28
std::vector< extra_cov > extra_covs
Definition recon_system.h:29
recon_system updated(const vector &values, const vector &confints) const
Return a new recon_system with updated values and confidence intervals.
Definition recon_system.cc:87
matrix get_covariance_matrix() const
Build and return the full covariance matrix from the registered variables and covariance coefficients...
Definition recon_system.cc:50
void print_constraints(const matrix &F) const
Print the constraint matrix F together with variable names to stdout.
Definition recon_system.cc:113
int get_number_measured() const
Return the number of variables that have measurements (non-negative confint).
Definition recon_system.cc:41
void print_vars() const
Print all variables with their values and confidence intervals to stdout.
Definition recon_system.cc:101
int find_var(const std::string &str) const
Return the index of a variable by name, or -1 if not found.
Definition recon_system.cc:25
void change_var(const char *name, double val, double confint)
Update the measured value and confidence interval of an existing variable.
Definition recon_system.cc:34
vector get_values() const
Return a vector of all variable values in registration order.
Definition recon_system.cc:78
void add_var(const char *name, double val, double confint)
Add a variable to be reconciled to the system.
Definition recon_system.cc:14
void add_covariance_coeff(const char *name1, const char *name2, double cov_coeff)
Register a covariance coefficient between two variables.
Definition recon_system.cc:19
RAII wrapper around a heap-allocated gsl_vector.
Definition gsl_wrapper.h:39
Definition dvr_assert.h:7
Definition recon_system.h:17
std::string name
Definition recon_system.h:18
double value
Definition recon_system.h:19
double confint
Definition recon_system.h:20