| 1 | #cxx . . $ `<file>/dwsys/Roots.h`/ifndef _Roots_h_ |
| 2 | #define _Roots_h_cxx . . $ `dwsys/Roots.h:2:9`! |
| 3 | /* Roots.h |
| 4 | * |
| 5 | * Copyright (C) 1993-2025 David Weenink |
| 6 | * |
| 7 | * This code is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or (at |
| 10 | * your option) any later version. |
| 11 | * |
| 12 | * This code is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | /* |
| 22 | djmw 20020813 GPL header |
| 23 | */ |
| 24 | |
| 25 | #include "Data.h"cxx . . $ `<file>/sys/Data.h`/ |
| 26 | #include "Graphics.h"cxx . . $ `<file>/sys/Graphics.h`/ |
| 27 | #include "Polynomial.h"cxx . . $ `<file>/dwsys/Polynomial.h`/ |
| 28 | #include "WorkvectorPool.h"cxx . . $ `<file>/dwsys/WorkvectorPool.h`/ |
| 29 | |
| 30 | #include "Roots_def.h"cxx . . $ `<file>/dwsys/Roots_def.h`/ |
| 31 | |
| 32 | |
| 33 | autoRootscxx . . $ autoRoots# Roots_createcxx . . $ Roots_create(27f7be40982d89fc). (integercxx . . $ integer# numberOfRoots); |
| 34 | |
| 35 | void Roots_fixIntoUnitCirclecxx . . $ Roots_fixIntoUnitCircle(ed161181b88d194d). (mutableRootscxx . . $ mutableRoots# me); |
| 36 | |
| 37 | void Roots_sortcxx . . $ Roots_sort(ed161181b88d194d). (mutableRootscxx . . $ mutableRoots# me); |
| 38 | /* Sort to size of real part a+bi, a-bi*/ |
| 39 | |
| 40 | dcomplexcxx . . $ dcomplex# Roots_evaluate_zcxx . . $ Roots_evaluate_z(4c9654220d6c2563). (constRootscxx . . $ constRoots# me, dcomplexcxx . . $ dcomplex# z); |
| 41 | |
| 42 | autoRootscxx . . $ autoRoots# Polynomial_to_Roots_evcxx . . $ Polynomial_to_Roots_ev(877cc1a78227ca1). (constPolynomialcxx . . $ constPolynomial# me); |
| 43 | |
| 44 | integercxx . . $ integer# Roots_getNumberOfRootscxx . . $ Roots_getNumberOfRoots(ff6c6b0c7b042759). (constRootscxx . . $ constRoots# me); |
| 45 | |
| 46 | void Roots_drawcxx . . $ Roots_draw(f7f3f81724c0846f). (constRootscxx . . $ constRoots# me, Graphicscxx . . $ Graphics# g, double rmin, double rmax, double imin, double imax, |
| 47 | conststring32cxx . . $ conststring32# symbol, double fontSize, bool garnish); |
| 48 | |
| 49 | dcomplexcxx . . $ dcomplex# Roots_getRootcxx . . $ Roots_getRoot(5013e1763267f53b). (constRootscxx . . $ constRoots# me, integercxx . . $ integer# index); |
| 50 | |
| 51 | void Roots_setRootcxx . . $ Roots_setRoot(ac8f1da151dc8dc3). (mutableRootscxx . . $ mutableRoots# me, integercxx . . $ integer# index, double re, double im); |
| 52 | |
| 53 | autoRootscxx . . $ autoRoots# Polynomial_to_Rootscxx . . $ Polynomial_to_Roots(877cc1a78227ca1). (constPolynomialcxx . . $ constPolynomial# me); |
| 54 | /* Find roots of polynomial and polish them */ |
| 55 | |
| 56 | void Roots_Polynomial_polishcxx . . $ Roots_Polynomial_polish(2f1d9b63ffdab6ed). (mutableRootscxx . . $ mutableRoots# me, constPolynomialcxx . . $ constPolynomial# thee); |
| 57 | |
| 58 | autoPolynomialcxx . . $ autoPolynomial# Roots_to_Polynomialcxx . . $ Roots_to_Polynomial(9eee9bce83ce8f69). (constRootscxx . . $ constRoots# me, bool rootsAreReal); |
| 59 | |
| 60 | /* |
| 61 | workspace size >= n * n + 2 * n + 11 * n= |
| 62 | n * n ; for hessenberg matrix |
| 63 | + 2 * n ; for real and imaginary parts |
| 64 | + 11 * n ; the maximum for dhseqr_ |
| 65 | */ |
| 66 | void Polynomial_into_Rootscxx . . $ Polynomial_into_Roots(ecf59616bf38ddc0). (constPolynomialcxx . . $ constPolynomial# me, mutableRootscxx . . $ mutableRoots# r, VECcxx . . $ VEC# workspace); |
| 67 | |
| 68 | #endif /* _Roots_h_ */ |