Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

NUM::PolyRootSolver_Bairstow Class Reference

Polynomial root solver based on the Bairstow method. More...

#include <rootsolve.h>

Inheritance diagram for NUM::PolyRootSolver_Bairstow:

Inheritance graph
[legend]
Collaboration diagram for NUM::PolyRootSolver_Bairstow:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PolyRootSolver_Bairstow ()
 ~PolyRootSolver_Bairstow ()
int solve (int order, const dbl *c, dbl *r)
 [overriding a virtual];


Public Attributes

Params par

Static Public Attributes

const Params defaults
 Default values of the parameters.


Private Member Functions

int _QuadricRealRoots (dbl *a, int n, dbl *wr)
int _QuadricRoots (dbl *a, int n, dbl *wr, dbl *wi)
int _FindQuadFact (dbl *a, int n, dbl *b, dbl *quad, int red_fact, dbl *err_est)
void _GetQuads (dbl *a, int n, dbl *quad, dbl *x)
int _Recurse (dbl *a, int n, dbl *b, int m, dbl *quad, dbl *err)
void _DiffPoly (dbl *a, int n, dbl *b)
dbl _Deflate (dbl *a, int n, dbl *b, dbl *quad)

Detailed Description

Polynomial root solver based on the Bairstow method.

Author:
Wolfgang Wieser ] wwieser (a) gmx <*> de [, based code published by C. Bond, (c) 2002,2003. Thanks to him for making it available.
This class implements a polynomial root solver based on the Bairstow (quadratic Newton) method.

This class is completely thread-save; several threads may execute the solve() function at the same time.

Definition at line 198 of file rootsolve.h.


Constructor & Destructor Documentation

NUM::PolyRootSolver_Bairstow::PolyRootSolver_Bairstow  ) 
 

Definition at line 470 of file bairstow.cc.

NUM::PolyRootSolver_Bairstow::~PolyRootSolver_Bairstow  ) 
 

Definition at line 477 of file bairstow.cc.


Member Function Documentation

dbl NUM::PolyRootSolver_Bairstow::_Deflate dbl a,
int  n,
dbl b,
dbl quad
[private]
 

Definition at line 400 of file bairstow.cc.

References dbl, and NUM::fabs().

Referenced by _GetQuads().

void NUM::PolyRootSolver_Bairstow::_DiffPoly dbl a,
int  n,
dbl b
[private]
 

Definition at line 389 of file bairstow.cc.

References dbl.

Referenced by _GetQuads(), and _Recurse().

int NUM::PolyRootSolver_Bairstow::_FindQuadFact dbl a,
int  n,
dbl b,
dbl quad,
int  red_fact,
dbl err_est
[private]
 

Definition at line 150 of file bairstow.cc.

References dbl, NUM::fabs(), NUM::PolyRootSolver_Bairstow::Params::initial_epsilon, NUM::PolyRootSolver_Bairstow::Params::iter_chg, NUM::PolyRootSolver_Bairstow::Params::maxiter, and par.

Referenced by _GetQuads(), and _Recurse().

void NUM::PolyRootSolver_Bairstow::_GetQuads dbl a,
int  n,
dbl quad,
dbl x
[private]
 

Definition at line 238 of file bairstow.cc.

References _Deflate(), _DiffPoly(), _FindQuadFact(), _Recurse(), dbl, NUM::PolyRootSolver_Bairstow::Params::maxiter, and par.

Referenced by solve().

int NUM::PolyRootSolver_Bairstow::_QuadricRealRoots dbl a,
int  n,
dbl wr
[private]
 

Definition at line 41 of file bairstow.cc.

References dbl, NUM::PolyRootSolver_Bairstow::Params::disc_epsilon, NUM::fabs(), and par.

Referenced by solve().

int NUM::PolyRootSolver_Bairstow::_QuadricRoots dbl a,
int  n,
dbl wr,
dbl wi
[private]
 

Definition at line 77 of file bairstow.cc.

References CritAssert, dbl, NUM::PolyRootSolver_Bairstow::Params::disc_epsilon, NUM::fabs(), and par.

int NUM::PolyRootSolver_Bairstow::_Recurse dbl a,
int  n,
dbl b,
int  m,
dbl quad,
dbl err
[private]
 

Definition at line 348 of file bairstow.cc.

References _DiffPoly(), _FindQuadFact(), dbl, NUM::fabs(), NUM::PolyRootSolver_Bairstow::Params::nearly_zero, and par.

Referenced by _GetQuads().

int NUM::PolyRootSolver_Bairstow::solve int  order,
const dbl c,
dbl r
[virtual]
 

[overriding a virtual];

Reimplemented from NUM::PolyRootSolver.

Definition at line 423 of file bairstow.cc.

References _GetQuads(), _QuadricRealRoots(), dbl, NUM::fabs(), NUM::PolyRootSolver_Bairstow::Params::nearly_zero, and par.


Member Data Documentation

const PolyRootSolver_Bairstow::Params NUM::PolyRootSolver_Bairstow::defaults [static]
 

Initial value:

 
{
    INIT_FIELD(nearly_zero) 1e-10,
    INIT_FIELD(maxiter) 500,
    INIT_FIELD(iter_chg) 200,
    INIT_FIELD(initial_epsilon) 1e-10,  
    INIT_FIELD(disc_epsilon) 1e-10
}
Default values of the parameters.

Definition at line 30 of file bairstow.cc.

Params NUM::PolyRootSolver_Bairstow::par
 

Definition at line 215 of file rootsolve.h.

Referenced by _FindQuadFact(), _GetQuads(), _QuadricRealRoots(), _QuadricRoots(), _Recurse(), and solve().


The documentation for this class was generated from the following files:
Generated on Sat Feb 19 22:35:57 2005 for Ray by doxygen 1.3.5