ActiViz .NET  5.8.0
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Private Member Functions | Static Private Member Functions
Kitware.VTK.vtkPolynomialSolversUnivariate Class Reference

vtkPolynomialSolversUnivariate - polynomial solvers More...

Inheritance diagram for Kitware.VTK.vtkPolynomialSolversUnivariate:
[legend]
Collaboration diagram for Kitware.VTK.vtkPolynomialSolversUnivariate:
[legend]

List of all members.

Public Member Functions

 vtkPolynomialSolversUnivariate (IntPtr rawCppThis, bool callDisposalMethod, bool strong)
 Automatically generated constructor - called from generated code. DO NOT call directly.
 vtkPolynomialSolversUnivariate ()
 Undocumented Block.
override int IsA (string type)
 Undocumented Block.
new vtkPolynomialSolversUnivariate NewInstance ()
 Undocumented Block.

Static Public Member Functions

static new
vtkPolynomialSolversUnivariate 
New ()
 Undocumented Block.
static int FerrariSolve (IntPtr c, IntPtr r, IntPtr m, double tol)
 Algebraically extracts REAL roots of the quartic polynomial with REAL coefficients X^4 + c[0] X^3 + c[1] X^2 + c[2] X + c[3] and stores them (when they exist) and their respective multiplicities in the r and m arrays, based on Ferrari's method. Some numerical noise can be filtered by the use of a tolerance tol instead of equality with 0 (one can use, e.g., VTK_DBL_EPSILON). Returns the number of roots. Warning: it is the user's responsibility to pass a non-negative tol.
static int FilterRoots (IntPtr P, int d, IntPtr upperBnds, int rootcount, double diameter)
 This uses the derivative sequence to filter possible roots of a polynomial. First it sorts the roots and removes any duplicates. If the number of sign changes of the derivative sequence at a root at upperBnds[i] == that at upperBnds[i] - diameter then the i^th value is removed from upperBnds. It returns the new number of roots.
static double GetDivisionTolerance ()
 Set/get the tolerance used when performing polynomial Euclidean division to find polynomial roots. This tolerance is used to decide whether the coefficient(s) of a polynomial remainder are close enough to zero to be neglected.
static int HabichtBisectionSolve (IntPtr P, int d, IntPtr a, IntPtr upperBnds, double tol)
 Finds all REAL roots (within tolerance tol) of the d -th degree polynomial

\[ P[0] X^d + ... + P[d-1] X + P[d] \]

in ]a[0] ; a[1]] using the Habicht sequence (polynomial coefficients are REAL) and returns the count nr. All roots are bracketed in the first ]upperBnds[i] - tol ; upperBnds[i]] intervals. Returns -1 if anything went wrong (such as: polynomial does not have degree d, the interval provided by the other is absurd, etc.).

static int HabichtBisectionSolve (IntPtr P, int d, IntPtr a, IntPtr upperBnds, double tol, int intervalType)
 Finds all REAL roots (within tolerance tol) of the d -th degree polynomial

\[ P[0] X^d + ... + P[d-1] X + P[d] \]

in ]a[0] ; a[1]] using the Habicht sequence (polynomial coefficients are REAL) and returns the count nr. All roots are bracketed in the first ]upperBnds[i] - tol ; upperBnds[i]] intervals. Returns -1 if anything went wrong (such as: polynomial does not have degree d, the interval provided by the other is absurd, etc.).

static int HabichtBisectionSolve (IntPtr P, int d, IntPtr a, IntPtr upperBnds, double tol, int intervalType, bool divideGCD)
 Finds all REAL roots (within tolerance tol) of the d -th degree polynomial

\[ P[0] X^d + ... + P[d-1] X + P[d] \]

in ]a[0] ; a[1]] using the Habicht sequence (polynomial coefficients are REAL) and returns the count nr. All roots are bracketed in the first ]upperBnds[i] - tol ; upperBnds[i]] intervals. Returns -1 if anything went wrong (such as: polynomial does not have degree d, the interval provided by the other is absurd, etc.).

static new int IsTypeOf (string type)
 Undocumented Block.
static int LinBairstowSolve (IntPtr c, int d, IntPtr r, ref double tolerance)
 Seeks all REAL roots of the d -th degree polynomial c[0] X^d + ... + c[d-1] X + c[d] = 0 equation Lin-Bairstow's method ( polynomial coefficients are REAL ) and stores the nr roots found ( multiple roots are multiply stored ) in r. tolerance is the user-defined solver tolerance; this variable may be relaxed by the iterative solver if needed. Returns nr. Warning: it is the user's responsibility to make sure the r array is large enough to contain the maximal number of expected roots.
static new
vtkPolynomialSolversUnivariate 
SafeDownCast (vtkObjectBase o)
 Undocumented Block.
static void SetDivisionTolerance (double tol)
 Set/get the tolerance used when performing polynomial Euclidean division to find polynomial roots. This tolerance is used to decide whether the coefficient(s) of a polynomial remainder are close enough to zero to be neglected.
static IntPtr SolveCubic (double c0, double c1, double c2, double c3)
 Solves a cubic equation c0*t^3 + c1*t^2 + c2*t + c3 = 0 when c0, c1, c2, and c3 are REAL. Solution is motivated by Numerical Recipes In C 2nd Ed. Return array contains number of (real) roots (counting multiple roots as one) followed by roots themselves. The value in roots[4] is a integer giving further information about the roots (see return codes for int SolveCubic() ).
static int SolveCubic (double c0, double c1, double c2, double c3, IntPtr r1, IntPtr r2, IntPtr r3, IntPtr num_roots)
 Solves a cubic equation when c0, c1, c2, And c3 Are REAL. Solution is motivated by Numerical Recipes In C 2nd Ed. Roots and number of real roots are stored in user provided variables r1, r2, r3, and num_roots. Note that the function can return the following integer values describing the roots: (0)-no solution; (-1)-infinite number of solutions; (1)-one distinct real root of multiplicity 3 (stored in r1); (2)-two distinct real roots, one of multiplicity 2 (stored in r1 & r2); (3)-three distinct real roots; (-2)-quadratic equation with complex conjugate solution (real part of root returned in r1, imaginary in r2); (-3)-one real root and a complex conjugate pair (real root in r1 and real part of pair in r2 and imaginary in r3).
static IntPtr SolveLinear (double c0, double c1)
 Solves a linear equation c2*t + c3 = 0 when c2 and c3 are REAL. Solution is motivated by Numerical Recipes In C 2nd Ed. Return array contains number of roots followed by roots themselves.
static int SolveLinear (double c0, double c1, IntPtr r1, IntPtr num_roots)
 Solves a linear equation c2*t + c3 = 0 when c2 and c3 are REAL. Solution is motivated by Numerical Recipes In C 2nd Ed. Root and number of (real) roots are stored in user provided variables r2 and num_roots.
static IntPtr SolveQuadratic (double c0, double c1, double c2)
 Solves a quadratic equation c1*t^2 + c2*t + c3 = 0 when c1, c2, and c3 are REAL. Solution is motivated by Numerical Recipes In C 2nd Ed. Return array contains number of (real) roots (counting multiple roots as one) followed by roots themselves. Note that roots[3] contains a return code further describing solution - see documentation for SolveCubic() for meaning of return codes.
static int SolveQuadratic (double c0, double c1, double c2, IntPtr r1, IntPtr r2, IntPtr num_roots)
 Solves a quadratic equation c1*t^2 + c2*t + c3 = 0 when c1, c2, and c3 are REAL. Solution is motivated by Numerical Recipes In C 2nd Ed. Roots and number of roots are stored in user provided variables r1, r2, num_roots.
static int SolveQuadratic (IntPtr c, IntPtr r, IntPtr m)
 Algebraically extracts REAL roots of the quadratic polynomial with REAL coefficients c[0] X^2 + c[1] X + c[2] and stores them (when they exist) and their respective multiplicities in the r and m arrays. Returns either the number of roots, or -1 if ininite number of roots.
static int SturmBisectionSolve (IntPtr P, int d, IntPtr a, IntPtr upperBnds, double tol)
 Finds all REAL roots (within tolerance tol) of the d -th degree polynomial P[0] X^d + ... + P[d-1] X + P[d] in ]a[0] ; a[1]] using Sturm's theorem ( polynomial coefficients are REAL ) and returns the count nr. All roots are bracketed in the first ]upperBnds[i] - tol ; upperBnds[i]] intervals. Returns -1 if anything went wrong (such as: polynomial does not have degree d, the interval provided by the other is absurd, etc.).
static int SturmBisectionSolve (IntPtr P, int d, IntPtr a, IntPtr upperBnds, double tol, int intervalType)
 Finds all REAL roots (within tolerance tol) of the d -th degree polynomial P[0] X^d + ... + P[d-1] X + P[d] in ]a[0] ; a[1]] using Sturm's theorem ( polynomial coefficients are REAL ) and returns the count nr. All roots are bracketed in the first ]upperBnds[i] - tol ; upperBnds[i]] intervals. Returns -1 if anything went wrong (such as: polynomial does not have degree d, the interval provided by the other is absurd, etc.).
static int SturmBisectionSolve (IntPtr P, int d, IntPtr a, IntPtr upperBnds, double tol, int intervalType, bool divideGCD)
 Finds all REAL roots (within tolerance tol) of the d -th degree polynomial P[0] X^d + ... + P[d-1] X + P[d] in ]a[0] ; a[1]] using Sturm's theorem ( polynomial coefficients are REAL ) and returns the count nr. All roots are bracketed in the first ]upperBnds[i] - tol ; upperBnds[i]] intervals. Returns -1 if anything went wrong (such as: polynomial does not have degree d, the interval provided by the other is absurd, etc.).
static int TartagliaCardanSolve (IntPtr c, IntPtr r, IntPtr m, double tol)
 Algebraically extracts REAL roots of the cubic polynomial with REAL coefficients X^3 + c[0] X^2 + c[1] X + c[2] and stores them (when they exist) and their respective multiplicities in the r and m arrays. Some numerical noise can be filtered by the use of a tolerance tol instead of equality with 0 (one can use, e.g., VTK_DBL_EPSILON). The main differences with SolveCubic are that (1) the polynomial must have unit leading coefficient, (2) complex roots are discarded upfront, (3) non-simple roots are stored only once, along with their respective multiplicities, and (4) some numerical noise is filtered by the use of relative tolerance instead of equality with 0. Returns the number of roots. <i> In memoriam </i> Niccolo Tartaglia (1500 - 1559), unfairly forgotten.

Public Attributes

new const string MRFullTypeName = "Kitware.VTK.vtkPolynomialSolversUnivariate"
 Automatically generated type registration mechanics.

Static Public Attributes

static new readonly string MRClassNameKey = "30vtkPolynomialSolversUnivariate"
 Automatically generated type registration mechanics.

Protected Member Functions

override void Dispose (bool disposing)
 Automatically generated protected Dispose method - called from public Dispose or the C# destructor. DO NOT call directly.

Private Member Functions

static internal IntPtr vtkPolynomialSolversUnivariate_New (ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount)
static internal int vtkPolynomialSolversUnivariate_FerrariSolve_01 (IntPtr c, IntPtr r, IntPtr m, double tol)
static internal int vtkPolynomialSolversUnivariate_FilterRoots_02 (IntPtr P, int d, IntPtr upperBnds, int rootcount, double diameter)
static internal double vtkPolynomialSolversUnivariate_GetDivisionTolerance_03 ()
static internal int vtkPolynomialSolversUnivariate_HabichtBisectionSolve_04 (IntPtr P, int d, IntPtr a, IntPtr upperBnds, double tol)
static internal int vtkPolynomialSolversUnivariate_HabichtBisectionSolve_05 (IntPtr P, int d, IntPtr a, IntPtr upperBnds, double tol, int intervalType)
static internal int vtkPolynomialSolversUnivariate_HabichtBisectionSolve_06 (IntPtr P, int d, IntPtr a, IntPtr upperBnds, double tol, int intervalType, byte divideGCD)
static internal int vtkPolynomialSolversUnivariate_IsA_07 (HandleRef pThis, string type)
static internal int vtkPolynomialSolversUnivariate_IsTypeOf_08 (string type)
static internal int vtkPolynomialSolversUnivariate_LinBairstowSolve_09 (IntPtr c, int d, IntPtr r, ref double tolerance)
static internal IntPtr vtkPolynomialSolversUnivariate_NewInstance_11 (HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount)
static internal IntPtr vtkPolynomialSolversUnivariate_SafeDownCast_12 (HandleRef o, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount)
static internal void vtkPolynomialSolversUnivariate_SetDivisionTolerance_13 (double tol)
static internal IntPtr vtkPolynomialSolversUnivariate_SolveCubic_14 (double c0, double c1, double c2, double c3)
static internal int vtkPolynomialSolversUnivariate_SolveCubic_15 (double c0, double c1, double c2, double c3, IntPtr r1, IntPtr r2, IntPtr r3, IntPtr num_roots)
static internal IntPtr vtkPolynomialSolversUnivariate_SolveLinear_16 (double c0, double c1)
static internal int vtkPolynomialSolversUnivariate_SolveLinear_17 (double c0, double c1, IntPtr r1, IntPtr num_roots)
static internal IntPtr vtkPolynomialSolversUnivariate_SolveQuadratic_18 (double c0, double c1, double c2)
static internal int vtkPolynomialSolversUnivariate_SolveQuadratic_19 (double c0, double c1, double c2, IntPtr r1, IntPtr r2, IntPtr num_roots)
static internal int vtkPolynomialSolversUnivariate_SolveQuadratic_20 (IntPtr c, IntPtr r, IntPtr m)
static internal int vtkPolynomialSolversUnivariate_SturmBisectionSolve_21 (IntPtr P, int d, IntPtr a, IntPtr upperBnds, double tol)
static internal int vtkPolynomialSolversUnivariate_SturmBisectionSolve_22 (IntPtr P, int d, IntPtr a, IntPtr upperBnds, double tol, int intervalType)
static internal int vtkPolynomialSolversUnivariate_SturmBisectionSolve_23 (IntPtr P, int d, IntPtr a, IntPtr upperBnds, double tol, int intervalType, byte divideGCD)
static internal int vtkPolynomialSolversUnivariate_TartagliaCardanSolve_24 (IntPtr c, IntPtr r, IntPtr m, double tol)

Static Private Member Functions

static vtkPolynomialSolversUnivariate ()
 Automatically generated type registration mechanics.

Detailed Description

vtkPolynomialSolversUnivariate - polynomial solvers

Description vtkPolynomialSolversUnivariate provides solvers for univariate polynomial equations with real coefficients. The Tartaglia-Cardan and Ferrari solvers work on polynomials of fixed degree 3 and 4, respectively. The Lin-Bairstow and Sturm solvers work on polynomials of arbitrary degree. The Sturm solver is the most robust solver but only reports roots within an interval and does not report multiplicities. The Lin-Bairstow solver reports multiplicities.

For difficult polynomials, you may wish to use FilterRoots to eliminate some of the roots reported by the Sturm solver. FilterRoots evaluates the derivatives near each root to eliminate cases where a local minimum or maximum is close to zero.

Thanks Thanks to Philippe Pebay, Korben Rusek, David Thompson, and Maurice Rojas for implementing these solvers.


Constructor & Destructor Documentation

Automatically generated type registration mechanics.

Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate ( IntPtr  rawCppThis,
bool  callDisposalMethod,
bool  strong 
)

Automatically generated constructor - called from generated code. DO NOT call directly.

Undocumented Block.


Member Function Documentation

override void Kitware.VTK.vtkPolynomialSolversUnivariate.Dispose ( bool  disposing) [protected]

Automatically generated protected Dispose method - called from public Dispose or the C# destructor. DO NOT call directly.

Reimplemented from Kitware.VTK.vtkObject.

static int Kitware.VTK.vtkPolynomialSolversUnivariate.FerrariSolve ( IntPtr  c,
IntPtr  r,
IntPtr  m,
double  tol 
) [static]

Algebraically extracts REAL roots of the quartic polynomial with REAL coefficients X^4 + c[0] X^3 + c[1] X^2 + c[2] X + c[3] and stores them (when they exist) and their respective multiplicities in the r and m arrays, based on Ferrari's method. Some numerical noise can be filtered by the use of a tolerance tol instead of equality with 0 (one can use, e.g., VTK_DBL_EPSILON). Returns the number of roots. Warning: it is the user's responsibility to pass a non-negative tol.

static int Kitware.VTK.vtkPolynomialSolversUnivariate.FilterRoots ( IntPtr  P,
int  d,
IntPtr  upperBnds,
int  rootcount,
double  diameter 
) [static]

This uses the derivative sequence to filter possible roots of a polynomial. First it sorts the roots and removes any duplicates. If the number of sign changes of the derivative sequence at a root at upperBnds[i] == that at upperBnds[i] - diameter then the i^th value is removed from upperBnds. It returns the new number of roots.

Set/get the tolerance used when performing polynomial Euclidean division to find polynomial roots. This tolerance is used to decide whether the coefficient(s) of a polynomial remainder are close enough to zero to be neglected.

static int Kitware.VTK.vtkPolynomialSolversUnivariate.HabichtBisectionSolve ( IntPtr  P,
int  d,
IntPtr  a,
IntPtr  upperBnds,
double  tol 
) [static]

Finds all REAL roots (within tolerance tol) of the d -th degree polynomial

\[ P[0] X^d + ... + P[d-1] X + P[d] \]

in ]a[0] ; a[1]] using the Habicht sequence (polynomial coefficients are REAL) and returns the count nr. All roots are bracketed in the first ]upperBnds[i] - tol ; upperBnds[i]] intervals. Returns -1 if anything went wrong (such as: polynomial does not have degree d, the interval provided by the other is absurd, etc.).

intervalType specifies the search interval as follows: 0 = 00 = ]a,b[ 1 = 10 = [a,b[ 2 = 01 = ]a,b] 3 = 11 = [a,b] This defaults to 0.

The last non-zero item in the Habicht sequence is the gcd of P and P'. The parameter divideGCD specifies whether the program should attempt to divide by the gcd and run again. It works better with polynomials known to have high multiplicities. When divideGCD != 0 then it attempts to divide by the GCD, if applicable. This defaults to 0.

Compared to the Sturm solver the Habicht solver is slower, although both are O(d^2). The Habicht solver has the added benefit that it has a built in mechanism to keep the leading coefficients of the result from polynomial division bounded above and below in absolute value. This will tend to keep the coefficients of the polynomials in the sequence from zeroing out prematurely or becoming infinite.

Constructing the Habicht sequence is O(d^2) in both time and space.

Warning: it is the user's responsibility to make sure the upperBnds array is large enough to contain the maximal number of expected roots. Note that nr is smaller or equal to the actual number of roots in ]a[0] ; a[1]] since roots within are lumped in the same bracket. array is large enough to contain the maximal number of expected upper bounds.

static int Kitware.VTK.vtkPolynomialSolversUnivariate.HabichtBisectionSolve ( IntPtr  P,
int  d,
IntPtr  a,
IntPtr  upperBnds,
double  tol,
int  intervalType 
) [static]

Finds all REAL roots (within tolerance tol) of the d -th degree polynomial

\[ P[0] X^d + ... + P[d-1] X + P[d] \]

in ]a[0] ; a[1]] using the Habicht sequence (polynomial coefficients are REAL) and returns the count nr. All roots are bracketed in the first ]upperBnds[i] - tol ; upperBnds[i]] intervals. Returns -1 if anything went wrong (such as: polynomial does not have degree d, the interval provided by the other is absurd, etc.).

intervalType specifies the search interval as follows: 0 = 00 = ]a,b[ 1 = 10 = [a,b[ 2 = 01 = ]a,b] 3 = 11 = [a,b] This defaults to 0.

The last non-zero item in the Habicht sequence is the gcd of P and P'. The parameter divideGCD specifies whether the program should attempt to divide by the gcd and run again. It works better with polynomials known to have high multiplicities. When divideGCD != 0 then it attempts to divide by the GCD, if applicable. This defaults to 0.

Compared to the Sturm solver the Habicht solver is slower, although both are O(d^2). The Habicht solver has the added benefit that it has a built in mechanism to keep the leading coefficients of the result from polynomial division bounded above and below in absolute value. This will tend to keep the coefficients of the polynomials in the sequence from zeroing out prematurely or becoming infinite.

Constructing the Habicht sequence is O(d^2) in both time and space.

Warning: it is the user's responsibility to make sure the upperBnds array is large enough to contain the maximal number of expected roots. Note that nr is smaller or equal to the actual number of roots in ]a[0] ; a[1]] since roots within are lumped in the same bracket. array is large enough to contain the maximal number of expected upper bounds.

static int Kitware.VTK.vtkPolynomialSolversUnivariate.HabichtBisectionSolve ( IntPtr  P,
int  d,
IntPtr  a,
IntPtr  upperBnds,
double  tol,
int  intervalType,
bool  divideGCD 
) [static]

Finds all REAL roots (within tolerance tol) of the d -th degree polynomial

\[ P[0] X^d + ... + P[d-1] X + P[d] \]

in ]a[0] ; a[1]] using the Habicht sequence (polynomial coefficients are REAL) and returns the count nr. All roots are bracketed in the first ]upperBnds[i] - tol ; upperBnds[i]] intervals. Returns -1 if anything went wrong (such as: polynomial does not have degree d, the interval provided by the other is absurd, etc.).

intervalType specifies the search interval as follows: 0 = 00 = ]a,b[ 1 = 10 = [a,b[ 2 = 01 = ]a,b] 3 = 11 = [a,b] This defaults to 0.

The last non-zero item in the Habicht sequence is the gcd of P and P'. The parameter divideGCD specifies whether the program should attempt to divide by the gcd and run again. It works better with polynomials known to have high multiplicities. When divideGCD != 0 then it attempts to divide by the GCD, if applicable. This defaults to 0.

Compared to the Sturm solver the Habicht solver is slower, although both are O(d^2). The Habicht solver has the added benefit that it has a built in mechanism to keep the leading coefficients of the result from polynomial division bounded above and below in absolute value. This will tend to keep the coefficients of the polynomials in the sequence from zeroing out prematurely or becoming infinite.

Constructing the Habicht sequence is O(d^2) in both time and space.

Warning: it is the user's responsibility to make sure the upperBnds array is large enough to contain the maximal number of expected roots. Note that nr is smaller or equal to the actual number of roots in ]a[0] ; a[1]] since roots within are lumped in the same bracket. array is large enough to contain the maximal number of expected upper bounds.

override int Kitware.VTK.vtkPolynomialSolversUnivariate.IsA ( string  type) [virtual]

Undocumented Block.

Reimplemented from Kitware.VTK.vtkObject.

static new int Kitware.VTK.vtkPolynomialSolversUnivariate.IsTypeOf ( string  type) [static]

Undocumented Block.

Reimplemented from Kitware.VTK.vtkObject.

static int Kitware.VTK.vtkPolynomialSolversUnivariate.LinBairstowSolve ( IntPtr  c,
int  d,
IntPtr  r,
ref double  tolerance 
) [static]

Seeks all REAL roots of the d -th degree polynomial c[0] X^d + ... + c[d-1] X + c[d] = 0 equation Lin-Bairstow's method ( polynomial coefficients are REAL ) and stores the nr roots found ( multiple roots are multiply stored ) in r. tolerance is the user-defined solver tolerance; this variable may be relaxed by the iterative solver if needed. Returns nr. Warning: it is the user's responsibility to make sure the r array is large enough to contain the maximal number of expected roots.

Undocumented Block.

Reimplemented from Kitware.VTK.vtkObject.

Undocumented Block.

Reimplemented from Kitware.VTK.vtkObject.

Undocumented Block.

Reimplemented from Kitware.VTK.vtkObject.

Here is the call graph for this function:

Set/get the tolerance used when performing polynomial Euclidean division to find polynomial roots. This tolerance is used to decide whether the coefficient(s) of a polynomial remainder are close enough to zero to be neglected.

static IntPtr Kitware.VTK.vtkPolynomialSolversUnivariate.SolveCubic ( double  c0,
double  c1,
double  c2,
double  c3 
) [static]

Solves a cubic equation c0*t^3 + c1*t^2 + c2*t + c3 = 0 when c0, c1, c2, and c3 are REAL. Solution is motivated by Numerical Recipes In C 2nd Ed. Return array contains number of (real) roots (counting multiple roots as one) followed by roots themselves. The value in roots[4] is a integer giving further information about the roots (see return codes for int SolveCubic() ).

static int Kitware.VTK.vtkPolynomialSolversUnivariate.SolveCubic ( double  c0,
double  c1,
double  c2,
double  c3,
IntPtr  r1,
IntPtr  r2,
IntPtr  r3,
IntPtr  num_roots 
) [static]

Solves a cubic equation when c0, c1, c2, And c3 Are REAL. Solution is motivated by Numerical Recipes In C 2nd Ed. Roots and number of real roots are stored in user provided variables r1, r2, r3, and num_roots. Note that the function can return the following integer values describing the roots: (0)-no solution; (-1)-infinite number of solutions; (1)-one distinct real root of multiplicity 3 (stored in r1); (2)-two distinct real roots, one of multiplicity 2 (stored in r1 & r2); (3)-three distinct real roots; (-2)-quadratic equation with complex conjugate solution (real part of root returned in r1, imaginary in r2); (-3)-one real root and a complex conjugate pair (real root in r1 and real part of pair in r2 and imaginary in r3).

static IntPtr Kitware.VTK.vtkPolynomialSolversUnivariate.SolveLinear ( double  c0,
double  c1 
) [static]

Solves a linear equation c2*t + c3 = 0 when c2 and c3 are REAL. Solution is motivated by Numerical Recipes In C 2nd Ed. Return array contains number of roots followed by roots themselves.

static int Kitware.VTK.vtkPolynomialSolversUnivariate.SolveLinear ( double  c0,
double  c1,
IntPtr  r1,
IntPtr  num_roots 
) [static]

Solves a linear equation c2*t + c3 = 0 when c2 and c3 are REAL. Solution is motivated by Numerical Recipes In C 2nd Ed. Root and number of (real) roots are stored in user provided variables r2 and num_roots.

static IntPtr Kitware.VTK.vtkPolynomialSolversUnivariate.SolveQuadratic ( double  c0,
double  c1,
double  c2 
) [static]

Solves a quadratic equation c1*t^2 + c2*t + c3 = 0 when c1, c2, and c3 are REAL. Solution is motivated by Numerical Recipes In C 2nd Ed. Return array contains number of (real) roots (counting multiple roots as one) followed by roots themselves. Note that roots[3] contains a return code further describing solution - see documentation for SolveCubic() for meaning of return codes.

static int Kitware.VTK.vtkPolynomialSolversUnivariate.SolveQuadratic ( double  c0,
double  c1,
double  c2,
IntPtr  r1,
IntPtr  r2,
IntPtr  num_roots 
) [static]

Solves a quadratic equation c1*t^2 + c2*t + c3 = 0 when c1, c2, and c3 are REAL. Solution is motivated by Numerical Recipes In C 2nd Ed. Roots and number of roots are stored in user provided variables r1, r2, num_roots.

static int Kitware.VTK.vtkPolynomialSolversUnivariate.SolveQuadratic ( IntPtr  c,
IntPtr  r,
IntPtr  m 
) [static]

Algebraically extracts REAL roots of the quadratic polynomial with REAL coefficients c[0] X^2 + c[1] X + c[2] and stores them (when they exist) and their respective multiplicities in the r and m arrays. Returns either the number of roots, or -1 if ininite number of roots.

static int Kitware.VTK.vtkPolynomialSolversUnivariate.SturmBisectionSolve ( IntPtr  P,
int  d,
IntPtr  a,
IntPtr  upperBnds,
double  tol 
) [static]

Finds all REAL roots (within tolerance tol) of the d -th degree polynomial P[0] X^d + ... + P[d-1] X + P[d] in ]a[0] ; a[1]] using Sturm's theorem ( polynomial coefficients are REAL ) and returns the count nr. All roots are bracketed in the first ]upperBnds[i] - tol ; upperBnds[i]] intervals. Returns -1 if anything went wrong (such as: polynomial does not have degree d, the interval provided by the other is absurd, etc.).

intervalType specifies the search interval as follows: 0 = 00 = ]a,b[ 1 = 10 = [a,b[ 2 = 01 = ]a,b] 3 = 11 = [a,b] This defaults to 0.

The last non-zero item in the Sturm sequence is the gcd of P and P'. The parameter divideGCD specifies whether the program should attempt to divide by the gcd and run again. It works better with polynomials known to have high multiplicities. When divideGCD != 0 then it attempts to divide by the GCD, if applicable. This defaults to 0.

Constructing the Sturm sequence is O(d^2) in both time and space.

Warning: it is the user's responsibility to make sure the upperBnds array is large enough to contain the maximal number of expected roots. Note that nr is smaller or equal to the actual number of roots in ]a[0] ; a[1]] since roots within are lumped in the same bracket. array is large enough to contain the maximal number of expected upper bounds.

static int Kitware.VTK.vtkPolynomialSolversUnivariate.SturmBisectionSolve ( IntPtr  P,
int  d,
IntPtr  a,
IntPtr  upperBnds,
double  tol,
int  intervalType 
) [static]

Finds all REAL roots (within tolerance tol) of the d -th degree polynomial P[0] X^d + ... + P[d-1] X + P[d] in ]a[0] ; a[1]] using Sturm's theorem ( polynomial coefficients are REAL ) and returns the count nr. All roots are bracketed in the first ]upperBnds[i] - tol ; upperBnds[i]] intervals. Returns -1 if anything went wrong (such as: polynomial does not have degree d, the interval provided by the other is absurd, etc.).

intervalType specifies the search interval as follows: 0 = 00 = ]a,b[ 1 = 10 = [a,b[ 2 = 01 = ]a,b] 3 = 11 = [a,b] This defaults to 0.

The last non-zero item in the Sturm sequence is the gcd of P and P'. The parameter divideGCD specifies whether the program should attempt to divide by the gcd and run again. It works better with polynomials known to have high multiplicities. When divideGCD != 0 then it attempts to divide by the GCD, if applicable. This defaults to 0.

Constructing the Sturm sequence is O(d^2) in both time and space.

Warning: it is the user's responsibility to make sure the upperBnds array is large enough to contain the maximal number of expected roots. Note that nr is smaller or equal to the actual number of roots in ]a[0] ; a[1]] since roots within are lumped in the same bracket. array is large enough to contain the maximal number of expected upper bounds.

static int Kitware.VTK.vtkPolynomialSolversUnivariate.SturmBisectionSolve ( IntPtr  P,
int  d,
IntPtr  a,
IntPtr  upperBnds,
double  tol,
int  intervalType,
bool  divideGCD 
) [static]

Finds all REAL roots (within tolerance tol) of the d -th degree polynomial P[0] X^d + ... + P[d-1] X + P[d] in ]a[0] ; a[1]] using Sturm's theorem ( polynomial coefficients are REAL ) and returns the count nr. All roots are bracketed in the first ]upperBnds[i] - tol ; upperBnds[i]] intervals. Returns -1 if anything went wrong (such as: polynomial does not have degree d, the interval provided by the other is absurd, etc.).

intervalType specifies the search interval as follows: 0 = 00 = ]a,b[ 1 = 10 = [a,b[ 2 = 01 = ]a,b] 3 = 11 = [a,b] This defaults to 0.

The last non-zero item in the Sturm sequence is the gcd of P and P'. The parameter divideGCD specifies whether the program should attempt to divide by the gcd and run again. It works better with polynomials known to have high multiplicities. When divideGCD != 0 then it attempts to divide by the GCD, if applicable. This defaults to 0.

Constructing the Sturm sequence is O(d^2) in both time and space.

Warning: it is the user's responsibility to make sure the upperBnds array is large enough to contain the maximal number of expected roots. Note that nr is smaller or equal to the actual number of roots in ]a[0] ; a[1]] since roots within are lumped in the same bracket. array is large enough to contain the maximal number of expected upper bounds.

static int Kitware.VTK.vtkPolynomialSolversUnivariate.TartagliaCardanSolve ( IntPtr  c,
IntPtr  r,
IntPtr  m,
double  tol 
) [static]

Algebraically extracts REAL roots of the cubic polynomial with REAL coefficients X^3 + c[0] X^2 + c[1] X + c[2] and stores them (when they exist) and their respective multiplicities in the r and m arrays. Some numerical noise can be filtered by the use of a tolerance tol instead of equality with 0 (one can use, e.g., VTK_DBL_EPSILON). The main differences with SolveCubic are that (1) the polynomial must have unit leading coefficient, (2) complex roots are discarded upfront, (3) non-simple roots are stored only once, along with their respective multiplicities, and (4) some numerical noise is filtered by the use of relative tolerance instead of equality with 0. Returns the number of roots. <i> In memoriam </i> Niccolo Tartaglia (1500 - 1559), unfairly forgotten.

static internal int Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_FerrariSolve_01 ( IntPtr  c,
IntPtr  r,
IntPtr  m,
double  tol 
) [private]
static internal int Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_FilterRoots_02 ( IntPtr  P,
int  d,
IntPtr  upperBnds,
int  rootcount,
double  diameter 
) [private]
static internal int Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_HabichtBisectionSolve_04 ( IntPtr  P,
int  d,
IntPtr  a,
IntPtr  upperBnds,
double  tol 
) [private]
static internal int Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_HabichtBisectionSolve_05 ( IntPtr  P,
int  d,
IntPtr  a,
IntPtr  upperBnds,
double  tol,
int  intervalType 
) [private]
static internal int Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_HabichtBisectionSolve_06 ( IntPtr  P,
int  d,
IntPtr  a,
IntPtr  upperBnds,
double  tol,
int  intervalType,
byte  divideGCD 
) [private]
static internal int Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_IsA_07 ( HandleRef  pThis,
string  type 
) [private]
static internal int Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_LinBairstowSolve_09 ( IntPtr  c,
int  d,
IntPtr  r,
ref double  tolerance 
) [private]
static internal IntPtr Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_New ( ref uint  mteStatus,
ref uint  mteIndex,
ref uint  rawRefCount 
) [private]
static internal IntPtr Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_NewInstance_11 ( HandleRef  pThis,
ref uint  mteStatus,
ref uint  mteIndex,
ref uint  rawRefCount 
) [private]
static internal IntPtr Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_SafeDownCast_12 ( HandleRef  o,
ref uint  mteStatus,
ref uint  mteIndex,
ref uint  rawRefCount 
) [private]
static internal IntPtr Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_SolveCubic_14 ( double  c0,
double  c1,
double  c2,
double  c3 
) [private]
static internal int Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_SolveCubic_15 ( double  c0,
double  c1,
double  c2,
double  c3,
IntPtr  r1,
IntPtr  r2,
IntPtr  r3,
IntPtr  num_roots 
) [private]
static internal IntPtr Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_SolveLinear_16 ( double  c0,
double  c1 
) [private]
static internal int Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_SolveLinear_17 ( double  c0,
double  c1,
IntPtr  r1,
IntPtr  num_roots 
) [private]
static internal IntPtr Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_SolveQuadratic_18 ( double  c0,
double  c1,
double  c2 
) [private]
static internal int Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_SolveQuadratic_19 ( double  c0,
double  c1,
double  c2,
IntPtr  r1,
IntPtr  r2,
IntPtr  num_roots 
) [private]
static internal int Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_SolveQuadratic_20 ( IntPtr  c,
IntPtr  r,
IntPtr  m 
) [private]
static internal int Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_SturmBisectionSolve_21 ( IntPtr  P,
int  d,
IntPtr  a,
IntPtr  upperBnds,
double  tol 
) [private]
static internal int Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_SturmBisectionSolve_22 ( IntPtr  P,
int  d,
IntPtr  a,
IntPtr  upperBnds,
double  tol,
int  intervalType 
) [private]
static internal int Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_SturmBisectionSolve_23 ( IntPtr  P,
int  d,
IntPtr  a,
IntPtr  upperBnds,
double  tol,
int  intervalType,
byte  divideGCD 
) [private]
static internal int Kitware.VTK.vtkPolynomialSolversUnivariate.vtkPolynomialSolversUnivariate_TartagliaCardanSolve_24 ( IntPtr  c,
IntPtr  r,
IntPtr  m,
double  tol 
) [private]

Member Data Documentation

new readonly string Kitware.VTK.vtkPolynomialSolversUnivariate.MRClassNameKey = "30vtkPolynomialSolversUnivariate" [static]

Automatically generated type registration mechanics.

Reimplemented from Kitware.VTK.vtkObject.

new const string Kitware.VTK.vtkPolynomialSolversUnivariate.MRFullTypeName = "Kitware.VTK.vtkPolynomialSolversUnivariate"

Automatically generated type registration mechanics.

Reimplemented from Kitware.VTK.vtkObject.


The documentation for this class was generated from the following file: