A class solves polynomial degree (1,2,3) equations. More...
#include <polysolver.h>
Static Public Member Functions | |
static int | solveCubic (S c[4], S s[3]) |
Solve a cubic function with coefficients c, return roots s and number of roots. More... | |
static int | solveLinear (S c[2], S s[1]) |
Solve a linear equation with coefficients c, return roots s and number of roots. More... | |
static int | solveQuadric (S c[3], S s[2]) |
Solve a quadratic function with coefficients c, return roots s and number of roots. More... | |
Static Private Member Functions | |
static bool | cbrt (S v) |
Compute v^{1/3}. More... | |
static constexpr S | getNearZeroThreshold () |
static bool | isZero (S v) |
Check whether v is zero. More... | |
A class solves polynomial degree (1,2,3) equations.
Definition at line 50 of file polysolver.h.
|
staticprivate |
Compute v^{1/3}.
Definition at line 186 of file polysolver-inl.h.
|
staticconstexprprivate |
Definition at line 193 of file polysolver-inl.h.
|
staticprivate |
Check whether v is zero.
Definition at line 179 of file polysolver-inl.h.
|
static |
Solve a cubic function with coefficients c, return roots s and number of roots.
Definition at line 103 of file polysolver-inl.h.
|
static |
Solve a linear equation with coefficients c, return roots s and number of roots.
Definition at line 57 of file polysolver-inl.h.
|
static |
Solve a quadratic function with coefficients c, return roots s and number of roots.
Definition at line 67 of file polysolver-inl.h.