Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-math
This commit is contained in:
commit
26fc13cf66
|
@ -2792,9 +2792,7 @@ public final class AccurateMath {
|
|||
}
|
||||
|
||||
// Call atan
|
||||
final double result = atan(ra, rb, x < 0);
|
||||
|
||||
return result;
|
||||
return atan(ra, rb, x < 0);
|
||||
}
|
||||
|
||||
/** Compute the arc sine of a number.
|
||||
|
|
|
@ -178,8 +178,7 @@ public final class SparseGradient implements RealFieldElement<SparseGradient>, S
|
|||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public SparseGradient add(final double c) {
|
||||
final SparseGradient out = new SparseGradient(value + c, derivatives);
|
||||
return out;
|
||||
return new SparseGradient(value + c, derivatives);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
|
|
|
@ -142,9 +142,7 @@ public class PiecewiseBicubicSplineInterpolatingFunction
|
|||
|
||||
final PolynomialSplineFunction spline = interpolator.interpolate(yArray, interpArray);
|
||||
|
||||
double returnValue = spline.value(y);
|
||||
|
||||
return returnValue;
|
||||
return spline.value(y);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -50,8 +50,7 @@ public class BinaryMutation implements MutationPolicy {
|
|||
// and change it
|
||||
newRepr.set(geneIndex, origChrom.getRepresentation().get(geneIndex) == 0 ? 1 : 0);
|
||||
|
||||
Chromosome newChrom = origChrom.newFixedLengthChromosome(newRepr);
|
||||
return newChrom;
|
||||
return origChrom.newFixedLengthChromosome(newRepr);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -119,8 +119,7 @@ public class LineSearch {
|
|||
for (int i = 0; i < n; i++) {
|
||||
x[i] = startPoint[i] + alpha * direction[i];
|
||||
}
|
||||
final double obj = mainOptimizer.computeObjectiveValue(x);
|
||||
return obj;
|
||||
return mainOptimizer.computeObjectiveValue(x);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -961,9 +961,7 @@ public class KolmogorovSmirnovTest {
|
|||
* \(D_{n,m}\) greater than {@code d}
|
||||
*/
|
||||
public double approximateP(double d, int n, int m) {
|
||||
final double dm = m;
|
||||
final double dn = n;
|
||||
return 1 - ksSum(d * AccurateMath.sqrt((dm * dn) / (dm + dn)),
|
||||
return 1 - ksSum(d * AccurateMath.sqrt(((double) m * (double) n) / ((double) m + (double) n)),
|
||||
KS_SUM_CAUCHY_CRITERION, MAXIMUM_PARTIAL_SUM_COUNT);
|
||||
}
|
||||
|
||||
|
|
|
@ -101,6 +101,9 @@ Caveat:
|
|||
Update class "SimplexOptimizer" (in package "o.a.c.m.legacy.optim.nonlinear.scalar.noderiv")
|
||||
to support simulated annealing.
|
||||
</action>
|
||||
<action dev="aherbert" due-to="Arturo Bernal" type="update" issue="MATH-1573">
|
||||
Remove redundant local variables.
|
||||
</action>
|
||||
<action dev="aherbert" due-to="Arturo Bernal" type="update" issue="MATH-1572">
|
||||
Simplify conditional expressions.
|
||||
</action>
|
||||
|
|
Loading…
Reference in New Issue