GeneralMath.h
13 static bool CalculateConcentration(const SEScalarMass& mass, const SEScalarVolume& volume, SEScalarMassPerVolume& concentration, Logger* logger = nullptr);
14 static bool CalculateMass(const SEScalarVolume& volume, const SEScalarMassPerVolume& concentration, SEScalarMass& mass, Logger* logger = nullptr);
15 static bool CalculateHenrysLawConcentration(const SESubstance& substance, const SEScalarPressure& partialPressure, SEScalarMassPerVolume& concentration, Logger* logger = nullptr);
16 static bool CalculatePartialPressureInGas(const SEScalar0To1& volumeFraction, const SEScalarPressure& pressure, SEScalarPressure& partialPressure, Logger* logger = nullptr);
17 static bool CalculatePartialPressureInLiquid(const SESubstance& substance, const SEScalarMassPerVolume& concentration, SEScalarPressure& partialPressure, Logger* logger = nullptr);
18 static void CalculateOsmolarity(const SEScalarAmountPerVolume& sodiumMolarity, const SEScalarAmountPerVolume& potassiumMolarity, const SEScalarAmountPerVolume& glucoseMolarity, const SEScalarAmountPerVolume& ureaMolarity, SEScalarOsmolarity& fluidOsmolarity);
19 static void CalculateOsmolality(const SEScalarAmountPerVolume& sodiumMolarity, const SEScalarAmountPerVolume& potassiumMolarity, const SEScalarAmountPerVolume& glucoseMolarity, const SEScalarAmountPerVolume& ureaMolarity, const SEScalar& specificGravity, SEScalarOsmolality& fluidOsmolality);
20 static bool CalculateSpecificGravity(const SEScalarMass& mass, const SEScalarVolume& volume, SEScalar& specificGravity, Logger* logger = nullptr);
22 static void Combinations(std::vector<size_t> maxValues, std::vector<std::vector<size_t>>& permutations);
28 static double PiecewiseLinearInterpolator(const std::vector<std::pair<double, double>>& points, double x);
32 static double Damper(double targetValue, double previousValue, double dampenFraction_perSec, double timeStep_s);
39 static double RootMeanSquaredError(std::vector<double> observed, std::vector<double> predicted, bool normalize = false, double outlierStandardDeviation = -1.0);
Definition: GeneralMath.h:11
Definition: Logger.h:71
Definition: SELiquidCompartment.h:11
Definition: SELiquidSubstanceQuantity.h:12
Definition: SEScalar0To1.h:8
Definition: SEScalarAmountPerVolume.h:31
Definition: SEScalar.h:19
Definition: SEScalarMass.h:28
Definition: SEScalarMassPerVolume.h:37
Definition: SEScalarOsmolality.h:25
Definition: SEScalarOsmolarity.h:25
Definition: SEScalarPressure.h:29
Definition: SEScalarVolume.h:28
Definition: SESubstance.h:15
Definition: SESubstanceManager.h:9