rroots.h File Reference

Finds all roots of polynomial by first finding quadratic factors using Bairstow's method, then extracting roots from quadratics. More...

#include <iostream>
#include <iomanip>
#include <math.h>
#include <stdlib.h>

Include dependency graph for rroots.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define maxiter   5000
 maximum number of iterations
#define DBL_EPSILON   1e-15
 some other epsilon and stuff

Functions

int roots (double *a, int n, double *wr, double *wi)
 Extract individual real or complex roots from list of quadratic factors.
void get_quads (double *a, int n, double *quad, double *x)
 Top level routine to manage the determination of all roots of the given polynomial 'a', returning the quadratic factors (and possibly one linear factor) in 'x'.


Detailed Description

Finds all roots of polynomial by first finding quadratic factors using Bairstow's method, then extracting roots from quadratics.

Implements new algorithm for managing multiple roots.

Date:
(C) 2002, 2003,
Author:
C. Bond. All rights reserved.

Definition in file rroots.h.


Define Documentation

#define DBL_EPSILON   1e-15

some other epsilon and stuff

Definition at line 22 of file rroots.h.

Referenced by roots().

#define maxiter   5000

maximum number of iterations

Definition at line 20 of file rroots.h.

Referenced by find_quad(), and get_quads().


Function Documentation

void get_quads ( double *  a,
int  n,
double *  quad,
double *  x 
)

Top level routine to manage the determination of all roots of the given polynomial 'a', returning the quadratic factors (and possibly one linear factor) in 'x'.

Todo:
Should gives error in case roots not founded. But that is commented.

Definition at line 201 of file rroots.cpp.

References deflate(), diff_poly(), err, find_quad(), i, maxiter, and recurse().

Referenced by rrouts().

Here is the call graph for this function:

Here is the caller graph for this function:

int roots ( double *  a,
int  n,
double *  wr,
double *  wi 
)

Extract individual real or complex roots from list of quadratic factors.

Definition at line 15 of file rroots.cpp.

References DBL_EPSILON.

Referenced by rrouts().

Here is the caller graph for this function:


Generated on Thu May 27 11:53:19 2010 for VERB_CODE_2.0 by  doxygen 1.5.9