|
int | Interpolate::getArrIdxPosition (const float farridx, const int arrsz, float &relpos, const float eps=1e-4) |
|
template<class T > |
T | greatestCommonDivisor (T val0, T val1) |
|
template<class T > |
StepInterval< T > | getCommonStepInterval (const StepInterval< T > &a, const StepInterval< T > &b) |
|
template<class iT > |
iT | exactPower (iT val, iT base) |
|
template<class iT > |
iT | nextPower (iT val, iT base) |
|
template<class iT > |
iT | getPow2Sz (iT actsz, const bool above=true, iT minsz=1, iT maxsz=0) |
|
template<class iT > |
iT | nextPower2 (iT nr, iT minnr, iT maxnr) |
|
template<class iT > |
iT | nrBlocks (iT totalsamples, iT basesize, iT overlapsize) |
|
template<class T > |
bool | taperArray (T *array, int sz, int lowpos, int highpos, Taper::Type type) |
|
template<class T > |
T | sampledGradient (T ym2, T ym1, T y0_, T y1_, T y2) |
|
template<class X , class Y , class RT > |
void | getGradient (const X &x, const Y &y, int sz, int firstx, int firsty, RT *gradptr=0, RT *interceptptr=0) |
|
template<class X > |
float | variance (const X &x, int sz) |
|
int | solve3DPoly (double a, double b, double c, double &root0, double &root1, double &root2) |
|
template<class T > |
bool | holdsClassValue (const T val, const unsigned int maxclss=50) |
|
template<class T > |
bool | holdsClassValues (const T *vals, od_int64 sz, const unsigned int maxclss=50, const unsigned int samplesz=100) |
|
template<class T > |
bool | isSigned8BitesValue (const T val) |
|
template<class T > |
bool | is8BitesData (const T *vals, od_int64 sz, const unsigned int samplesz=100) |
|
int solve3DPoly |
( |
double |
a, |
|
|
double |
b, |
|
|
double |
c, |
|
|
double & |
root0, |
|
|
double & |
root1, |
|
|
double & |
root2 |
|
) |
| |
|
inline |
solve3DPoly - finds the roots of the equation
z^3+a*z^2+b*z+c = 0
solve3DPoly returns the number of real roots found.
Algorithms taken from NR, page 185.
The complex roots can be calculated as follows: const double sqrt3_through_2 = Math::Sqrt(3)/2;
root1 = complex_double( 0.5*(A+B)+minus_a_through_3, sqrt3_through_2*(A-B));
root2 = complex_double( 0.5*(A+B)+minus_a_through_3, -sqrt3_through_2*(A-B));