Roots.hpp
Eigen::Ref< Eigen::MatrixXd > MatrixRef
Alias to Eigen type Ref<MatrixXd>.
Definition: Matrix.hpp:43
std::tuple< double, double > SquareRoots
Define a type that describes the roots of a square equation.
Definition: Roots.hpp:34
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
std::tuple< std::complex< double >, std::complex< double >, std::complex< double > > CubicRoots
Define a type that describes the roots of a cubic equation.
Definition: Roots.hpp:31
auto realRoots(const CubicRoots &roots) -> std::vector< double >
Return all real roots of a group of roots.
Definition: Roots.cpp:120
auto cardano(double a, double b, double c, double d) -> CubicRoots
Calculate the roots of a cubic equation using Cardano's method.
Definition: Roots.cpp:28
Eigen::Ref< Eigen::VectorXd > VectorRef
< Alias to Eigen type VectorXd.
Definition: Matrix.hpp:29
Eigen::Ref< const Eigen::VectorXd > VectorConstRef
< Alias to Eigen type Ref<VectorXd>.
Definition: Matrix.hpp:31
auto newton(const std::function< std::tuple< double, double >(double)> &f, double x0, double epsilon, unsigned maxiter) -> double
Calculate the root of a non-linear function using Newton's method.
Definition: Roots.cpp:76