1#ifndef CYCLUS_SRC_COMP_MATH_H_
2#define CYCLUS_SRC_COMP_MATH_H_
CompMap Sub(const CompMap &v1, const CompMap &v2)
Does component-wise subtraction of the nuclide quantities of v1 and v2 and returns the result.
bool AlmostEq(const CompMap &v1, const CompMap &v2, double threshold)
Returns true if all nuclides of v1 and v2 are the same within threshold.
void ApplyThreshold(CompMap *v, double threshold)
All nuclides with quantities below threshold will have their quantity set to zero.
CompMap Add(const CompMap &v1, const CompMap &v2)
Does component-wise subtraction of the nuclide quantities of v1 and v2 and returns the result.
double Sum(const CompMap &v)
Sums the quantities of all nuclides without normalization.
bool ValidNucs(const CompMap &v)
Returns true if all nuclide keys in v are valid.
bool AllPositive(const CompMap &v)
Returns true if all nuclides in v have quantities greater than or equal to zero.
void Normalize(CompMap *v, double val)
The sum of quantities of all nuclides of v is normalized to val.
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
std::map< Nuc, double > CompMap
a raw definition of nuclides and corresponding (dimensionless quantities).
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters