|
Marsyas
0.6.0-alpha
|
#include <marsyas/common_source.h>#include <marsyas/NumericLib.h>#include <marsyas/basis.h>#include "vmblock.h"#include "lu.h"#include <cfloat>#include <limits>#include <stdlib.h>#include <iostream>#include <fstream>#include <sstream>#include <algorithm>Go to the source code of this file.
Defines | |
| #define | BOUND sqrt(DBL_EPSILON) |
| #define | BOUND1 1.01 /* improve convergence in case of small changes */ |
| #define | BOUND2 0.99 /* of |P(x)|^2 */ |
| #define | BOUND3 0.01 |
| #define | BOUND4 sqrt(DBL_MAX)/1e4 /* if |P(x2).real()|+|P(x2).i|>BOUND4 => */ |
| #define | BOUND6 log10(BOUND4)-4 /* if |x2|^nred>10^BOUND6 => */ |
| #define | BOUND7 1e-5 /* relative distance between determined root and */ |
| #define | Cabs(z) std::abs(z) |
| #define | Cadd(a, b) (a+b) |
| #define | CADD(x, a, b) {x = a + b;} |
| #define | Carg(z) std::arg(z) |
| #define | Ccomplex(a, b) mrs_complex(a,b) |
| #define | Cdiv(a, b) (a/b) |
| #define | Cmul(a, b) (a*b) |
| #define | CMUL(x, a, b) {x = a * b;} |
| #define | COMPLEXM(x, a, b) {x = mrs_complex(a,b);} |
| #define | Conjg(z) std::conj(z) |
| #define | CONVERGENCE 100/* halve q2, when |P(x2)/P(x1)|^2 > CONVERGENCE */ |
| #define | Csqrt(z) std::sqrt(z) |
| #define | Csub(a, b) (a-b) |
| #define | FACTORMULLER 1e5 /* if |f2|<FACTOR*macc and (x2-x1)/x2<FACTOR*macc */ |
| #define | FACTORNEWTON 5 /* calculate new dx, when change of x0 is smaller */ |
| #define | FVALUEMULLER 1e36 /* initialisation of |P(x)|^2 */ |
| #define | FVALUENEWTON 1E36 /* initialisation of |P(xmin)| */ |
| #define | ITERMAXMULLER 150 /* max. number of iteration steps */ |
| #define | ITERMAXNEWTON 20 /* max. number of iterations */ |
| #define | KITERMAX 1e3 /* halve distance between old and new x2 max. */ |
| #define | MAXDIST 1e3 /* max. relative change of distance between */ |
| #define | NOISEMAX 5 /* if noise>NOISEMAX: terminate iteration */ |
| #define | NOISEMAX 5 /* max. number of iterations with no better value */ |
| #define | NOISESTART DBL_EPSILON*1e2 /* when noise starts counting */ |
| #define | NumericLib_MAXCOEFF 5001 /* max. number of coefficients */ |
| #define | NumLib_FALSE 0 |
| #define | NumLib_TRUE 1 |
| #define | RCadd(x, a) (x+a) |
| #define | RCmul(x, a) (x*a) |
| #define BOUND sqrt(DBL_EPSILON) |
Definition at line 104 of file NumericLib.cpp.
| #define BOUND1 1.01 /* improve convergence in case of small changes */ |
Definition at line 87 of file NumericLib.cpp.
| #define BOUND2 0.99 /* of |P(x)|^2 */ |
Definition at line 88 of file NumericLib.cpp.
| #define BOUND3 0.01 |
Definition at line 89 of file NumericLib.cpp.
| #define BOUND4 sqrt(DBL_MAX)/1e4 /* if |P(x2).real()|+|P(x2).i|>BOUND4 => */ |
Definition at line 90 of file NumericLib.cpp.
Definition at line 92 of file NumericLib.cpp.
| #define BOUND7 1e-5 /* relative distance between determined root and */ |
Definition at line 94 of file NumericLib.cpp.
| #define Cabs | ( | z | ) | std::abs(z) |
Definition at line 67 of file NumericLib.cpp.
| #define Cadd | ( | a, | |
| b | |||
| ) | (a+b) |
Definition at line 62 of file NumericLib.cpp.
| #define CADD | ( | x, | |
| a, | |||
| b | |||
| ) | {x = a + b;} |
Definition at line 73 of file NumericLib.cpp.
| #define Carg | ( | z | ) | std::arg(z) |
Definition at line 68 of file NumericLib.cpp.
| #define Ccomplex | ( | a, | |
| b | |||
| ) | mrs_complex(a,b) |
Definition at line 66 of file NumericLib.cpp.
| #define Cdiv | ( | a, | |
| b | |||
| ) | (a/b) |
Definition at line 65 of file NumericLib.cpp.
| #define Cmul | ( | a, | |
| b | |||
| ) | (a*b) |
Definition at line 64 of file NumericLib.cpp.
| #define CMUL | ( | x, | |
| a, | |||
| b | |||
| ) | {x = a * b;} |
Definition at line 74 of file NumericLib.cpp.
| #define COMPLEXM | ( | x, | |
| a, | |||
| b | |||
| ) | {x = mrs_complex(a,b);} |
Definition at line 75 of file NumericLib.cpp.
| #define Conjg | ( | z | ) | std::conj(z) |
Definition at line 69 of file NumericLib.cpp.
| #define CONVERGENCE 100/* halve q2, when |P(x2)/P(x1)|^2 > CONVERGENCE */ |
Definition at line 79 of file NumericLib.cpp.
| #define Csqrt | ( | z | ) | std::sqrt(z) |
Definition at line 70 of file NumericLib.cpp.
| #define Csub | ( | a, | |
| b | |||
| ) | (a-b) |
Definition at line 63 of file NumericLib.cpp.
| #define FACTORMULLER 1e5 /* if |f2|<FACTOR*macc and (x2-x1)/x2<FACTOR*macc */ |
Definition at line 82 of file NumericLib.cpp.
| #define FACTORNEWTON 5 /* calculate new dx, when change of x0 is smaller */ |
Definition at line 101 of file NumericLib.cpp.
| #define FVALUEMULLER 1e36 /* initialisation of |P(x)|^2 */ |
Definition at line 86 of file NumericLib.cpp.
| #define FVALUENEWTON 1E36 /* initialisation of |P(xmin)| */ |
Definition at line 103 of file NumericLib.cpp.
| #define ITERMAXMULLER 150 /* max. number of iteration steps */ |
Definition at line 78 of file NumericLib.cpp.
| #define ITERMAXNEWTON 20 /* max. number of iterations */ |
Definition at line 100 of file NumericLib.cpp.
| #define KITERMAX 1e3 /* halve distance between old and new x2 max. */ |
Definition at line 84 of file NumericLib.cpp.
| #define MAXDIST 1e3 /* max. relative change of distance between */ |
Definition at line 80 of file NumericLib.cpp.
| #define NOISEMAX 5 /* if noise>NOISEMAX: terminate iteration */ |
Definition at line 107 of file NumericLib.cpp.
| #define NOISEMAX 5 /* max. number of iterations with no better value */ |
Definition at line 107 of file NumericLib.cpp.
| #define NOISESTART DBL_EPSILON*1e2 /* when noise starts counting */ |
Definition at line 96 of file NumericLib.cpp.
| #define NumericLib_MAXCOEFF 5001 /* max. number of coefficients */ |
Definition at line 55 of file NumericLib.cpp.
| #define NumLib_FALSE 0 |
Definition at line 58 of file NumericLib.cpp.
| #define NumLib_TRUE 1 |
Definition at line 57 of file NumericLib.cpp.
| #define RCadd | ( | x, | |
| a | |||
| ) | (x+a) |
Definition at line 72 of file NumericLib.cpp.
| #define RCmul | ( | x, | |
| a | |||
| ) | (x*a) |
Definition at line 71 of file NumericLib.cpp.
1.7.6.1