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