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