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