Added missing javadoc.
This commit is contained in:
parent
ab908d64bf
commit
2272f5cce7
|
@ -158,6 +158,7 @@ public class IterativeLegendreGaussIntegrator
|
||||||
throws TooManyEvaluationsException {
|
throws TooManyEvaluationsException {
|
||||||
// Function to be integrated is stored in the base class.
|
// Function to be integrated is stored in the base class.
|
||||||
final UnivariateFunction f = new UnivariateFunction() {
|
final UnivariateFunction f = new UnivariateFunction() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public double value(double x)
|
public double value(double x)
|
||||||
throws MathIllegalArgumentException, TooManyEvaluationsException {
|
throws MathIllegalArgumentException, TooManyEvaluationsException {
|
||||||
|
|
|
@ -97,6 +97,7 @@ public class BicubicInterpolator
|
||||||
// Create the interpolating function.
|
// Create the interpolating function.
|
||||||
return new BicubicInterpolatingFunction(xval, yval, fval,
|
return new BicubicInterpolatingFunction(xval, yval, fval,
|
||||||
dFdX, dFdY, d2FdXdY) {
|
dFdX, dFdY, d2FdXdY) {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public boolean isValidPoint(double x, double y) {
|
public boolean isValidPoint(double x, double y) {
|
||||||
if (x < xval[1] ||
|
if (x < xval[1] ||
|
||||||
|
|
|
@ -125,6 +125,7 @@ public class TricubicInterpolator
|
||||||
dFdX, dFdY, dFdZ,
|
dFdX, dFdY, dFdZ,
|
||||||
d2FdXdY, d2FdXdZ, d2FdYdZ,
|
d2FdXdY, d2FdXdZ, d2FdYdZ,
|
||||||
d3FdXdYdZ) {
|
d3FdXdYdZ) {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public boolean isValidPoint(double x, double y, double z) {
|
public boolean isValidPoint(double x, double y, double z) {
|
||||||
if (x < xval[1] ||
|
if (x < xval[1] ||
|
||||||
|
|
|
@ -116,6 +116,7 @@ public class UnivariatePeriodicInterpolator
|
||||||
|
|
||||||
final UnivariateFunction f = interpolator.interpolate(x, y);
|
final UnivariateFunction f = interpolator.interpolate(x, y);
|
||||||
return new UnivariateFunction() {
|
return new UnivariateFunction() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public double value(final double x) throws MathIllegalArgumentException {
|
public double value(final double x) throws MathIllegalArgumentException {
|
||||||
return f.value(MathUtils.reduce(x, period, offset));
|
return f.value(MathUtils.reduce(x, period, offset));
|
||||||
|
|
|
@ -104,6 +104,7 @@ public class PolynomialsUtils {
|
||||||
public static PolynomialFunction createChebyshevPolynomial(final int degree) {
|
public static PolynomialFunction createChebyshevPolynomial(final int degree) {
|
||||||
return buildPolynomial(degree, CHEBYSHEV_COEFFICIENTS,
|
return buildPolynomial(degree, CHEBYSHEV_COEFFICIENTS,
|
||||||
new RecurrenceCoefficientsGenerator() {
|
new RecurrenceCoefficientsGenerator() {
|
||||||
|
/** Fixed recurrence coefficients. */
|
||||||
private final BigFraction[] coeffs = { BigFraction.ZERO, BigFraction.TWO, BigFraction.ONE };
|
private final BigFraction[] coeffs = { BigFraction.ZERO, BigFraction.TWO, BigFraction.ONE };
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -163,7 +163,7 @@ implements RealDistribution, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
final UnivariateFunction toSolve = new UnivariateFunction() {
|
final UnivariateFunction toSolve = new UnivariateFunction() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public double value(final double x) {
|
public double value(final double x) {
|
||||||
return cumulativeProbability(x) - p;
|
return cumulativeProbability(x) - p;
|
||||||
|
|
|
@ -54,6 +54,7 @@ public class ConstantRealDistribution extends AbstractRealDistribution {
|
||||||
return x < value ? 0 : 1;
|
return x < value ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public double inverseCumulativeProbability(final double p)
|
public double inverseCumulativeProbability(final double p)
|
||||||
throws OutOfRangeException {
|
throws OutOfRangeException {
|
||||||
|
|
|
@ -118,6 +118,7 @@ public class GumbelDistribution extends AbstractRealDistribution {
|
||||||
return FastMath.exp(-FastMath.exp(-z));
|
return FastMath.exp(-FastMath.exp(-z));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public double inverseCumulativeProbability(double p) throws OutOfRangeException {
|
public double inverseCumulativeProbability(double p) throws OutOfRangeException {
|
||||||
if (p < 0.0 || p > 1.0) {
|
if (p < 0.0 || p > 1.0) {
|
||||||
|
|
|
@ -111,6 +111,7 @@ public class LaplaceDistribution extends AbstractRealDistribution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public double inverseCumulativeProbability(double p) throws OutOfRangeException {
|
public double inverseCumulativeProbability(double p) throws OutOfRangeException {
|
||||||
if (p < 0.0 || p > 1.0) {
|
if (p < 0.0 || p > 1.0) {
|
||||||
|
|
|
@ -112,6 +112,7 @@ public class LogisticDistribution extends AbstractRealDistribution {
|
||||||
return 1.0 / (1.0 + FastMath.exp(-z));
|
return 1.0 / (1.0 + FastMath.exp(-z));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public double inverseCumulativeProbability(double p) throws OutOfRangeException {
|
public double inverseCumulativeProbability(double p) throws OutOfRangeException {
|
||||||
if (p < 0.0 || p > 1.0) {
|
if (p < 0.0 || p > 1.0) {
|
||||||
|
|
|
@ -130,6 +130,7 @@ public class NakagamiDistribution extends AbstractRealDistribution {
|
||||||
return omega;
|
return omega;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
protected double getSolverAbsoluteAccuracy() {
|
protected double getSolverAbsoluteAccuracy() {
|
||||||
return inverseAbsoluteAccuracy;
|
return inverseAbsoluteAccuracy;
|
||||||
|
|
|
@ -259,6 +259,7 @@ public class TriangularDistribution extends AbstractRealDistribution {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public double inverseCumulativeProbability(double p)
|
public double inverseCumulativeProbability(double p)
|
||||||
throws OutOfRangeException {
|
throws OutOfRangeException {
|
||||||
|
|
|
@ -119,6 +119,7 @@ public class UniformRealDistribution extends AbstractRealDistribution {
|
||||||
return (x - lower) / (upper - lower);
|
return (x - lower) / (upper - lower);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public double inverseCumulativeProbability(final double p)
|
public double inverseCumulativeProbability(final double p)
|
||||||
throws OutOfRangeException {
|
throws OutOfRangeException {
|
||||||
|
|
|
@ -271,6 +271,7 @@ public class ZipfDistribution extends AbstractIntegerDistribution {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public int sample() {
|
public int sample() {
|
||||||
if (sampler == null) {
|
if (sampler == null) {
|
||||||
|
|
|
@ -134,6 +134,7 @@ public abstract class AbstractCurveFitter {
|
||||||
*/
|
*/
|
||||||
public MultivariateMatrixFunction getModelFunctionJacobian() {
|
public MultivariateMatrixFunction getModelFunctionJacobian() {
|
||||||
return new MultivariateMatrixFunction() {
|
return new MultivariateMatrixFunction() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public double[][] value(double[] p) {
|
public double[][] value(double[] p) {
|
||||||
final int len = points.length;
|
final int len = points.length;
|
||||||
|
|
|
@ -72,6 +72,7 @@ import org.apache.commons.math4.util.FastMath;
|
||||||
public class GaussianCurveFitter extends AbstractCurveFitter {
|
public class GaussianCurveFitter extends AbstractCurveFitter {
|
||||||
/** Parametric function to be fitted. */
|
/** Parametric function to be fitted. */
|
||||||
private static final Gaussian.Parametric FUNCTION = new Gaussian.Parametric() {
|
private static final Gaussian.Parametric FUNCTION = new Gaussian.Parametric() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public double value(double x, double ... p) {
|
public double value(double x, double ... p) {
|
||||||
double v = Double.POSITIVE_INFINITY;
|
double v = Double.POSITIVE_INFINITY;
|
||||||
|
@ -83,6 +84,7 @@ public class GaussianCurveFitter extends AbstractCurveFitter {
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public double[] gradient(double x, double ... p) {
|
public double[] gradient(double x, double ... p) {
|
||||||
double[] v = { Double.POSITIVE_INFINITY,
|
double[] v = { Double.POSITIVE_INFINITY,
|
||||||
|
@ -249,6 +251,7 @@ public class GaussianCurveFitter extends AbstractCurveFitter {
|
||||||
final List<WeightedObservedPoint> observations = new ArrayList<WeightedObservedPoint>(unsorted);
|
final List<WeightedObservedPoint> observations = new ArrayList<WeightedObservedPoint>(unsorted);
|
||||||
|
|
||||||
final Comparator<WeightedObservedPoint> cmp = new Comparator<WeightedObservedPoint>() {
|
final Comparator<WeightedObservedPoint> cmp = new Comparator<WeightedObservedPoint>() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public int compare(WeightedObservedPoint p1,
|
public int compare(WeightedObservedPoint p1,
|
||||||
WeightedObservedPoint p2) {
|
WeightedObservedPoint p2) {
|
||||||
|
|
|
@ -248,6 +248,7 @@ public class GaussNewtonOptimizer implements LeastSquaresOptimizer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "GaussNewtonOptimizer{" +
|
return "GaussNewtonOptimizer{" +
|
||||||
|
|
|
@ -192,6 +192,7 @@ public class LeastSquaresFactory {
|
||||||
final RealMatrix weights) {
|
final RealMatrix weights) {
|
||||||
final RealMatrix weightSquareRoot = squareRoot(weights);
|
final RealMatrix weightSquareRoot = squareRoot(weights);
|
||||||
return new LeastSquaresAdapter(problem) {
|
return new LeastSquaresAdapter(problem) {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public Evaluation evaluate(final RealVector point) {
|
public Evaluation evaluate(final RealVector point) {
|
||||||
return new DenseWeightedEvaluation(super.evaluate(point), weightSquareRoot);
|
return new DenseWeightedEvaluation(super.evaluate(point), weightSquareRoot);
|
||||||
|
@ -226,6 +227,7 @@ public class LeastSquaresFactory {
|
||||||
final Incrementor counter) {
|
final Incrementor counter) {
|
||||||
return new LeastSquaresAdapter(problem) {
|
return new LeastSquaresAdapter(problem) {
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public Evaluation evaluate(final RealVector point) {
|
public Evaluation evaluate(final RealVector point) {
|
||||||
counter.incrementCount();
|
counter.incrementCount();
|
||||||
|
@ -245,6 +247,7 @@ public class LeastSquaresFactory {
|
||||||
*/
|
*/
|
||||||
public static ConvergenceChecker<Evaluation> evaluationChecker(final ConvergenceChecker<PointVectorValuePair> checker) {
|
public static ConvergenceChecker<Evaluation> evaluationChecker(final ConvergenceChecker<PointVectorValuePair> checker) {
|
||||||
return new ConvergenceChecker<Evaluation>() {
|
return new ConvergenceChecker<Evaluation>() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public boolean converged(final int iteration,
|
public boolean converged(final int iteration,
|
||||||
final Evaluation previous,
|
final Evaluation previous,
|
||||||
|
|
|
@ -98,6 +98,7 @@ public abstract class AbstractListChromosome<T> extends Chromosome {
|
||||||
*/
|
*/
|
||||||
public abstract AbstractListChromosome<T> newFixedLengthChromosome(final List<T> chromosomeRepresentation);
|
public abstract AbstractListChromosome<T> newFixedLengthChromosome(final List<T> chromosomeRepresentation);
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("(f=%s %s)", getFitness(), getRepresentation());
|
return String.format("(f=%s %s)", getFitness(), getRepresentation());
|
||||||
|
|
|
@ -74,6 +74,7 @@ public abstract class BinaryChromosome extends AbstractListChromosome<Integer> {
|
||||||
return rList;
|
return rList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
protected boolean isSame(Chromosome another) {
|
protected boolean isSame(Chromosome another) {
|
||||||
// type check
|
// type check
|
||||||
|
|
|
@ -58,6 +58,7 @@ public class ChromosomePair {
|
||||||
return second;
|
return second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("(%s,%s)", getFirst(), getSecond());
|
return String.format("(%s,%s)", getFirst(), getSecond());
|
||||||
|
|
|
@ -278,6 +278,7 @@ public abstract class RandomKey<T> extends AbstractListChromosome<Double> implem
|
||||||
return Arrays.asList(res);
|
return Arrays.asList(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("(f=%s pi=(%s))", getFitness(), baseSeqPermutation);
|
return String.format("(f=%s pi=(%s))", getFitness(), baseSeqPermutation);
|
||||||
|
|
|
@ -75,6 +75,7 @@ public class TournamentSelection implements SelectionPolicy {
|
||||||
}
|
}
|
||||||
// auxiliary population
|
// auxiliary population
|
||||||
ListPopulation tournamentPopulation = new ListPopulation(this.arity) {
|
ListPopulation tournamentPopulation = new ListPopulation(this.arity) {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public Population nextGeneration() {
|
public Population nextGeneration() {
|
||||||
// not useful here
|
// not useful here
|
||||||
|
|
|
@ -452,7 +452,6 @@ public class Line implements Hyperplane<Euclidean2D>, Embedding<Euclidean2D, Euc
|
||||||
*/
|
*/
|
||||||
private static class LineTransform implements Transform<Euclidean2D, Euclidean1D> {
|
private static class LineTransform implements Transform<Euclidean2D, Euclidean1D> {
|
||||||
|
|
||||||
// CHECKSTYLE: stop JavadocVariable check
|
|
||||||
/** Transform factor between input abscissa and output abscissa. */
|
/** Transform factor between input abscissa and output abscissa. */
|
||||||
private final double cXX;
|
private final double cXX;
|
||||||
|
|
||||||
|
@ -471,10 +470,14 @@ public class Line implements Hyperplane<Euclidean2D>, Embedding<Euclidean2D, Euc
|
||||||
/** Transform addendum for output ordinate. */
|
/** Transform addendum for output ordinate. */
|
||||||
private final double cY1;
|
private final double cY1;
|
||||||
|
|
||||||
|
/** cXY * cY1 - cYY * cX1. */
|
||||||
private final double c1Y;
|
private final double c1Y;
|
||||||
|
|
||||||
|
/** cXX * cY1 - cYX * cX1. */
|
||||||
private final double c1X;
|
private final double c1X;
|
||||||
|
|
||||||
|
/** cXX * cYY - cYX * cXY. */
|
||||||
private final double c11;
|
private final double c11;
|
||||||
// CHECKSTYLE: resume JavadocVariable check
|
|
||||||
|
|
||||||
/** Build an affine line transform from a n {@code AffineTransform}.
|
/** Build an affine line transform from a n {@code AffineTransform}.
|
||||||
* @param cXX transform factor between input abscissa and output abscissa
|
* @param cXX transform factor between input abscissa and output abscissa
|
||||||
|
|
|
@ -73,6 +73,7 @@ public class MonotoneChain extends AbstractConvexHullGenerator2D {
|
||||||
super(includeCollinearPoints, tolerance);
|
super(includeCollinearPoints, tolerance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public Collection<Vector2D> findHullVertices(final Collection<Vector2D> points) {
|
public Collection<Vector2D> findHullVertices(final Collection<Vector2D> points) {
|
||||||
|
|
||||||
|
@ -80,6 +81,7 @@ public class MonotoneChain extends AbstractConvexHullGenerator2D {
|
||||||
|
|
||||||
// sort the points in increasing order on the x-axis
|
// sort the points in increasing order on the x-axis
|
||||||
Collections.sort(pointsSortedByXAxis, new Comparator<Vector2D>() {
|
Collections.sort(pointsSortedByXAxis, new Comparator<Vector2D>() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public int compare(final Vector2D o1, final Vector2D o2) {
|
public int compare(final Vector2D o1, final Vector2D o2) {
|
||||||
final double tolerance = getTolerance();
|
final double tolerance = getTolerance();
|
||||||
|
|
|
@ -110,6 +110,7 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
|
||||||
// (we don't want equal size elements to be removed, so
|
// (we don't want equal size elements to be removed, so
|
||||||
// we use a trick to fool the TreeSet)
|
// we use a trick to fool the TreeSet)
|
||||||
final TreeSet<SubHyperplane<S>> ordered = new TreeSet<SubHyperplane<S>>(new Comparator<SubHyperplane<S>>() {
|
final TreeSet<SubHyperplane<S>> ordered = new TreeSet<SubHyperplane<S>>(new Comparator<SubHyperplane<S>>() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public int compare(final SubHyperplane<S> o1, final SubHyperplane<S> o2) {
|
public int compare(final SubHyperplane<S> o1, final SubHyperplane<S> o2) {
|
||||||
final double size1 = o1.getSize();
|
final double size1 = o1.getSize();
|
||||||
|
|
|
@ -45,6 +45,7 @@ public class SumOfClusterVariances<T extends Clusterable> extends ClusterEvaluat
|
||||||
super(measure);
|
super(measure);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public double score(final List<? extends Cluster<T>> clusters) {
|
public double score(final List<? extends Cluster<T>> clusters) {
|
||||||
double varianceSum = 0.0;
|
double varianceSum = 0.0;
|
||||||
|
|
|
@ -236,6 +236,8 @@ public class EventState {
|
||||||
final double h = dt / n;
|
final double h = dt / n;
|
||||||
|
|
||||||
final UnivariateFunction f = new UnivariateFunction() {
|
final UnivariateFunction f = new UnivariateFunction() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
|
@Override
|
||||||
public double value(final double t) throws LocalMaxCountExceededException {
|
public double value(final double t) throws LocalMaxCountExceededException {
|
||||||
try {
|
try {
|
||||||
interpolator.setInterpolatedTime(t);
|
interpolator.setInterpolatedTime(t);
|
||||||
|
|
|
@ -183,6 +183,7 @@ public class LinearConstraint implements Serializable {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object other) {
|
public boolean equals(Object other) {
|
||||||
if (this == other) {
|
if (this == other) {
|
||||||
|
@ -197,6 +198,7 @@ public class LinearConstraint implements Serializable {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return relationship.hashCode() ^
|
return relationship.hashCode() ^
|
||||||
|
|
|
@ -107,6 +107,7 @@ public class LinearObjectiveFunction
|
||||||
return coefficients.dotProduct(point) + constantTerm;
|
return coefficients.dotProduct(point) + constantTerm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object other) {
|
public boolean equals(Object other) {
|
||||||
if (this == other) {
|
if (this == other) {
|
||||||
|
@ -120,6 +121,7 @@ public class LinearObjectiveFunction
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Double.valueOf(constantTerm).hashCode() ^ coefficients.hashCode();
|
return Double.valueOf(constantTerm).hashCode() ^ coefficients.hashCode();
|
||||||
|
|
|
@ -41,6 +41,7 @@ public enum Relationship {
|
||||||
this.stringValue = stringValue;
|
this.stringValue = stringValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return stringValue;
|
return stringValue;
|
||||||
|
|
|
@ -674,6 +674,7 @@ class SimplexTableau implements Serializable {
|
||||||
return tableau.getData();
|
return tableau.getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object other) {
|
public boolean equals(Object other) {
|
||||||
|
|
||||||
|
@ -696,6 +697,7 @@ class SimplexTableau implements Serializable {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Boolean.valueOf(restrictToNonNegative).hashCode() ^
|
return Boolean.valueOf(restrictToNonNegative).hashCode() ^
|
||||||
|
|
|
@ -112,6 +112,7 @@ public class LineSearch {
|
||||||
final double[] direction) {
|
final double[] direction) {
|
||||||
final int n = startPoint.length;
|
final int n = startPoint.length;
|
||||||
final UnivariateFunction f = new UnivariateFunction() {
|
final UnivariateFunction f = new UnivariateFunction() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public double value(double alpha) {
|
public double value(double alpha) {
|
||||||
final double[] x = new double[n];
|
final double[] x = new double[n];
|
||||||
|
|
|
@ -94,6 +94,7 @@ public class MultiStartMultivariateOptimizer
|
||||||
*/
|
*/
|
||||||
private Comparator<PointValuePair> getPairComparator() {
|
private Comparator<PointValuePair> getPairComparator() {
|
||||||
return new Comparator<PointValuePair>() {
|
return new Comparator<PointValuePair>() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public int compare(final PointValuePair o1,
|
public int compare(final PointValuePair o1,
|
||||||
final PointValuePair o2) {
|
final PointValuePair o2) {
|
||||||
|
|
|
@ -54,18 +54,29 @@ public class BOBYQAOptimizer
|
||||||
public static final double DEFAULT_INITIAL_RADIUS = 10.0;
|
public static final double DEFAULT_INITIAL_RADIUS = 10.0;
|
||||||
/** Default value for {@link #stoppingTrustRegionRadius}: {@value} . */
|
/** Default value for {@link #stoppingTrustRegionRadius}: {@value} . */
|
||||||
public static final double DEFAULT_STOPPING_RADIUS = 1E-8;
|
public static final double DEFAULT_STOPPING_RADIUS = 1E-8;
|
||||||
|
/** Constant 0. */
|
||||||
private static final double ZERO = 0d;
|
private static final double ZERO = 0d;
|
||||||
|
/** Constant 1. */
|
||||||
private static final double ONE = 1d;
|
private static final double ONE = 1d;
|
||||||
|
/** Constant 2. */
|
||||||
private static final double TWO = 2d;
|
private static final double TWO = 2d;
|
||||||
|
/** Constant 10. */
|
||||||
private static final double TEN = 10d;
|
private static final double TEN = 10d;
|
||||||
|
/** Constant 16. */
|
||||||
private static final double SIXTEEN = 16d;
|
private static final double SIXTEEN = 16d;
|
||||||
|
/** Constant 250. */
|
||||||
private static final double TWO_HUNDRED_FIFTY = 250d;
|
private static final double TWO_HUNDRED_FIFTY = 250d;
|
||||||
|
/** Constant -1. */
|
||||||
private static final double MINUS_ONE = -ONE;
|
private static final double MINUS_ONE = -ONE;
|
||||||
|
/** Constant 1/2. */
|
||||||
private static final double HALF = ONE / 2;
|
private static final double HALF = ONE / 2;
|
||||||
|
/** Constant 1/4. */
|
||||||
private static final double ONE_OVER_FOUR = ONE / 4;
|
private static final double ONE_OVER_FOUR = ONE / 4;
|
||||||
|
/** Constant 1/8. */
|
||||||
private static final double ONE_OVER_EIGHT = ONE / 8;
|
private static final double ONE_OVER_EIGHT = ONE / 8;
|
||||||
|
/** Constant 1/10. */
|
||||||
private static final double ONE_OVER_TEN = ONE / 10;
|
private static final double ONE_OVER_TEN = ONE / 10;
|
||||||
|
/** Constant 1/1000. */
|
||||||
private static final double ONE_OVER_A_THOUSAND = ONE / 1000;
|
private static final double ONE_OVER_A_THOUSAND = ONE / 1000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2447,8 +2458,10 @@ public class BOBYQAOptimizer
|
||||||
* If the path becomes explored, it should just be removed from the code.
|
* If the path becomes explored, it should just be removed from the code.
|
||||||
*/
|
*/
|
||||||
private static class PathIsExploredException extends RuntimeException {
|
private static class PathIsExploredException extends RuntimeException {
|
||||||
|
/** Serializable UID. */
|
||||||
private static final long serialVersionUID = 745350979634801853L;
|
private static final long serialVersionUID = 745350979634801853L;
|
||||||
|
|
||||||
|
/** Message string. */
|
||||||
private static final String PATH_IS_EXPLORED
|
private static final String PATH_IS_EXPLORED
|
||||||
= "If this exception is thrown, just remove it from the code";
|
= "If this exception is thrown, just remove it from the code";
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,7 @@ public class SimplexOptimizer extends MultivariateOptimizer {
|
||||||
// evaluations counter.
|
// evaluations counter.
|
||||||
final MultivariateFunction evalFunc
|
final MultivariateFunction evalFunc
|
||||||
= new MultivariateFunction() {
|
= new MultivariateFunction() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public double value(double[] point) {
|
public double value(double[] point) {
|
||||||
return computeObjectiveValue(point);
|
return computeObjectiveValue(point);
|
||||||
|
@ -140,6 +141,7 @@ public class SimplexOptimizer extends MultivariateOptimizer {
|
||||||
final boolean isMinim = getGoalType() == GoalType.MINIMIZE;
|
final boolean isMinim = getGoalType() == GoalType.MINIMIZE;
|
||||||
final Comparator<PointValuePair> comparator
|
final Comparator<PointValuePair> comparator
|
||||||
= new Comparator<PointValuePair>() {
|
= new Comparator<PointValuePair>() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public int compare(final PointValuePair o1,
|
public int compare(final PointValuePair o1,
|
||||||
final PointValuePair o2) {
|
final PointValuePair o2) {
|
||||||
|
|
|
@ -211,6 +211,7 @@ public class MultiStartUnivariateOptimizer
|
||||||
*/
|
*/
|
||||||
private void sortPairs(final GoalType goal) {
|
private void sortPairs(final GoalType goal) {
|
||||||
Arrays.sort(optima, new Comparator<UnivariatePointValuePair>() {
|
Arrays.sort(optima, new Comparator<UnivariatePointValuePair>() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public int compare(final UnivariatePointValuePair o1,
|
public int compare(final UnivariatePointValuePair o1,
|
||||||
final UnivariatePointValuePair o2) {
|
final UnivariatePointValuePair o2) {
|
||||||
|
|
|
@ -195,6 +195,7 @@ public class Beta {
|
||||||
} else {
|
} else {
|
||||||
ContinuedFraction fraction = new ContinuedFraction() {
|
ContinuedFraction fraction = new ContinuedFraction() {
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
protected double getB(int n, double x) {
|
protected double getB(int n, double x) {
|
||||||
double ret;
|
double ret;
|
||||||
|
@ -211,6 +212,7 @@ public class Beta {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
protected double getA(int n, double x) {
|
protected double getA(int n, double x) {
|
||||||
return 1.0;
|
return 1.0;
|
||||||
|
|
|
@ -402,11 +402,13 @@ public class Gamma {
|
||||||
// create continued fraction
|
// create continued fraction
|
||||||
ContinuedFraction cf = new ContinuedFraction() {
|
ContinuedFraction cf = new ContinuedFraction() {
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
protected double getA(int n, double x) {
|
protected double getA(int n, double x) {
|
||||||
return ((2.0 * n) + 1.0) - a + x;
|
return ((2.0 * n) + 1.0) - a + x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
protected double getB(int n, double x) {
|
protected double getB(int n, double x) {
|
||||||
return n * (a - n);
|
return n * (a - n);
|
||||||
|
|
|
@ -168,6 +168,7 @@ public class KendallsCorrelation {
|
||||||
}
|
}
|
||||||
|
|
||||||
Arrays.sort(pairs, new Comparator<Pair<Double, Double>>() {
|
Arrays.sort(pairs, new Comparator<Pair<Double, Double>>() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public int compare(Pair<Double, Double> pair1, Pair<Double, Double> pair2) {
|
public int compare(Pair<Double, Double> pair1, Pair<Double, Double> pair2) {
|
||||||
int compareFirst = pair1.getFirst().compareTo(pair2.getFirst());
|
int compareFirst = pair1.getFirst().compareTo(pair2.getFirst());
|
||||||
|
|
|
@ -825,6 +825,7 @@ public class PSquarePercentile extends AbstractStorelessUnivariateStatistic
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Arrays.hashCode(new double[] {markerHeight, intMarkerPosition,
|
return Arrays.hashCode(new double[] {markerHeight, intMarkerPosition,
|
||||||
|
|
|
@ -846,12 +846,14 @@ public class MathArrays {
|
||||||
final Comparator<PairDoubleInteger> comp
|
final Comparator<PairDoubleInteger> comp
|
||||||
= dir == MathArrays.OrderDirection.INCREASING ?
|
= dir == MathArrays.OrderDirection.INCREASING ?
|
||||||
new Comparator<PairDoubleInteger>() {
|
new Comparator<PairDoubleInteger>() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public int compare(PairDoubleInteger o1,
|
public int compare(PairDoubleInteger o1,
|
||||||
PairDoubleInteger o2) {
|
PairDoubleInteger o2) {
|
||||||
return Double.compare(o1.getKey(), o2.getKey());
|
return Double.compare(o1.getKey(), o2.getKey());
|
||||||
}
|
}
|
||||||
} : new Comparator<PairDoubleInteger>() {
|
} : new Comparator<PairDoubleInteger>() {
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public int compare(PairDoubleInteger o1,
|
public int compare(PairDoubleInteger o1,
|
||||||
PairDoubleInteger o2) {
|
PairDoubleInteger o2) {
|
||||||
|
|
|
@ -133,6 +133,7 @@ public class Pair<K, V> {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "[" + getKey() + ", " + getValue() + "]";
|
return "[" + getKey() + ", " + getValue() + "]";
|
||||||
|
|
Loading…
Reference in New Issue