libpappsomspp
Library for mass spectrometry
|
cubic solver adapted from https://www.codeproject.com/articles/798474/to-solve-a-cubic-equation thanks to "Sergey Bochkanov" serge.nosp@m.y.bo.nosp@m.chkan.nosp@m.ov@a.nosp@m.lglib.nosp@m..net for his advise More...
Go to the source code of this file.
Functions | |
void | cubic_solver (InHousePolynomialSolverResult &res, double a1, double b, double c, double d) |
InHousePolynomialSolverResult | inHousePolynomialSolve (const std::vector< double > &polynome) |
Variables | |
const double | BUFFER_SQRT3 {std::sqrt(3.0)} |
const double | BUFFER_inv27 {1.0 / 27.0} |
const double | BUFFER_pow11 {std::pow(10.0, -11.0)} |
cubic solver adapted from https://www.codeproject.com/articles/798474/to-solve-a-cubic-equation thanks to "Sergey Bochkanov" serge.nosp@m.y.bo.nosp@m.chkan.nosp@m.ov@a.nosp@m.lglib.nosp@m..net for his advise
Definition in file cardano.cpp.
void cubic_solver | ( | InHousePolynomialSolverResult & | res, |
double | a1, | ||
double | b, | ||
double | c, | ||
double | d ) |
adapted in c++ from https://www.codeproject.com/articles/798474/to-solve-a-cubic-equation thanks to "Sergey Bochkanov" serge.nosp@m.y.bo.nosp@m.chkan.nosp@m.ov@a.nosp@m.lglib.nosp@m..net for his advise
Cubic Equation https://github.com/harveytriana/CubicEquation Quartic Equation https://github.com/harveytriana/QuarticEcuation
Definition at line 42 of file cardano.cpp.
References BUFFER_inv27, BUFFER_pow11, negatived, positived, and zerod.
Referenced by inHousePolynomialSolve().
InHousePolynomialSolverResult inHousePolynomialSolve | ( | const std::vector< double > & | polynome | ) |
Definition at line 118 of file cardano.cpp.
References cubic_solver(), line, notvalid, and quadratic.
Referenced by pappso::MzCalibrationModel1::getMzFromTofIndex().
const double BUFFER_inv27 {1.0 / 27.0} |
const double BUFFER_pow11 {std::pow(10.0, -11.0)} |
const double BUFFER_SQRT3 {std::sqrt(3.0)} |
Definition at line 37 of file cardano.cpp.