1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.hipparchus.optim.nonlinear.vector.leastsquares;
23
24 import org.hipparchus.linear.RealMatrix;
25 import org.hipparchus.linear.RealVector;
26 import org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresOptimizer.Optimum;
27 import org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresProblem.Evaluation;
28
29
30
31
32
33 class OptimumImpl implements Optimum {
34
35
36 private final Evaluation value;
37
38 private final int evaluations;
39
40 private final int iterations;
41
42
43
44
45
46
47
48
49 OptimumImpl(final Evaluation value, final int evaluations, final int iterations) {
50 this.value = value;
51 this.evaluations = evaluations;
52 this.iterations = iterations;
53 }
54
55
56
57
58 @Override
59 public int getEvaluations() {
60 return evaluations;
61 }
62
63
64 @Override
65 public int getIterations() {
66 return iterations;
67 }
68
69
70 @Override
71 public RealMatrix getCovariances(double threshold) {
72 return value.getCovariances(threshold);
73 }
74
75
76 @Override
77 public RealVector getSigma(double covarianceSingularityThreshold) {
78 return value.getSigma(covarianceSingularityThreshold);
79 }
80
81
82 @Override
83 public double getRMS() {
84 return value.getRMS();
85 }
86
87
88 @Override
89 public RealMatrix getJacobian() {
90 return value.getJacobian();
91 }
92
93
94 @Override
95 public double getCost() {
96 return value.getCost();
97 }
98
99
100 @Override
101 public double getChiSquare() {
102 return value.getChiSquare();
103 }
104
105
106 @Override
107 public double getReducedChiSquare(int n) {
108 return value.getReducedChiSquare(n);
109 }
110
111
112 @Override
113 public RealVector getResiduals() {
114 return value.getResiduals();
115 }
116
117
118 @Override
119 public RealVector getPoint() {
120 return value.getPoint();
121 }
122 }