1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.hipparchus.special.elliptic.legendre;
18
19 import org.hipparchus.analysis.CalculusFieldUnivariateFunction;
20 import org.hipparchus.analysis.integration.IterativeLegendreGaussIntegrator;
21 import org.hipparchus.complex.Complex;
22 import org.hipparchus.complex.ComplexUnivariateIntegrator;
23
24 public class LegendreEllipticIntegralComplexTest extends LegendreEllipticIntegralAbstractComplexTest<Complex> {
25
26 private ComplexUnivariateIntegrator integrator() {
27 return new ComplexUnivariateIntegrator(new IterativeLegendreGaussIntegrator(24,
28 1.0e-6,
29 1.0e-6));
30 }
31
32 protected Complex buildComplex(double realPart) {
33 return new Complex(realPart);
34 }
35
36 protected Complex buildComplex(double realPart, double imaginaryPart) {
37 return new Complex(realPart, imaginaryPart);
38 }
39
40 protected Complex K(Complex m) {
41 return LegendreEllipticIntegral.bigK(m);
42 }
43
44 protected Complex Kprime(Complex m) {
45 return LegendreEllipticIntegral.bigKPrime(m);
46 }
47
48 protected Complex F(Complex phi, Complex m) {
49 return LegendreEllipticIntegral.bigF(phi, m);
50 }
51
52 protected Complex integratedF(Complex phi, Complex m) {
53 return LegendreEllipticIntegral.bigF(phi, m, integrator(), 100000);
54 }
55
56 protected Complex E(Complex m) {
57 return LegendreEllipticIntegral.bigE(m);
58 }
59
60 protected Complex E(Complex phi, Complex m) {
61 return LegendreEllipticIntegral.bigE(phi, m);
62 }
63
64 protected Complex integratedE(Complex phi, Complex m) {
65 return LegendreEllipticIntegral.bigE(phi, m, integrator(), 100000);
66 }
67
68 protected Complex D(Complex m) {
69 return LegendreEllipticIntegral.bigD(m);
70 }
71
72 protected Complex D(Complex phi, Complex m) {
73 return LegendreEllipticIntegral.bigD(phi, m);
74 }
75
76 protected Complex Pi(Complex n, Complex m) {
77 return LegendreEllipticIntegral.bigPi(n, m);
78 }
79
80 protected Complex Pi(Complex n, Complex phi, Complex m) {
81 return LegendreEllipticIntegral.bigPi(n, phi, m);
82 }
83
84 protected Complex integratedPi(Complex n, Complex phi, Complex m) {
85 return LegendreEllipticIntegral.bigPi(n, phi, m, integrator(), 100000);
86 }
87
88 protected Complex integrate(int maxEval, CalculusFieldUnivariateFunction<Complex> f, Complex start, Complex end) {
89 return integrator().integrate(maxEval, f, start, end);
90 }
91
92 protected Complex integrate(int maxEval, CalculusFieldUnivariateFunction<Complex> f, Complex start, Complex middle, Complex end) {
93 return integrator().integrate(maxEval, f, start, middle, end);
94 }
95
96 }