VERB_code_2.2
2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Macros
Pages
rroots.h
Go to the documentation of this file.
1
/**
2
* Finds all roots of polynomial by first finding quadratic
3
* factors using Bairstow's method, then extracting roots
4
* from quadratics. Implements new algorithm for managing
5
* multiple roots.
6
*
7
* \file rroots.h
8
* \date (C) 2002, 2003,
9
* \author C. Bond. All rights reserved.
10
*/
11
12
#include <iostream>
13
#include <iomanip>
14
#include <math.h>
15
#include <stdlib.h>
16
17
#ifndef rroots_H
18
#define rroots_H
19
20
using namespace
std;
21
22
/// maximum number of iterations
23
#define maxiter 5000
24
/// some other epsilon and stuff
25
#ifndef DBL_EPSILON
26
#define DBL_EPSILON 1e-15
27
#endif
28
29
/// Extract individual real or complex roots from list of quadratic factors
30
int
roots
(
double
*a,
int
n,
double
*wr,
double
*wi);
31
32
/// Top level routine to manage the determination of all roots of the given
33
/// polynomial 'a', returning the quadratic factors (and possibly one linear
34
/// factor) in 'x'.
35
void
get_quads
(
double
*a,
int
n,
double
*quad,
double
*x);
36
37
38
#endif
DiffusionCoefficient
rroots.h
Generated on Sat Nov 16 2013 09:31:46 for VERB_code_2.2 by
1.8.4