Minor checkstyle fixes in optimization.[direct|linear].
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1239805 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c9369dc298
commit
ab3935c4c9
|
@ -22,7 +22,6 @@ import org.apache.commons.math.analysis.UnivariateFunction;
|
|||
import org.apache.commons.math.analysis.function.Logit;
|
||||
import org.apache.commons.math.analysis.function.Sigmoid;
|
||||
import org.apache.commons.math.exception.DimensionMismatchException;
|
||||
import org.apache.commons.math.exception.MathIllegalArgumentException;
|
||||
import org.apache.commons.math.exception.NumberIsTooSmallException;
|
||||
import org.apache.commons.math.util.FastMath;
|
||||
import org.apache.commons.math.util.MathUtils;
|
||||
|
@ -92,7 +91,7 @@ public class MultivariateFunctionMappingAdapter implements MultivariateFunction
|
|||
* @param upper upper bounds for each element of the input parameters array
|
||||
* (some elements may be set to {@code Double.POSITIVE_INFINITY} for
|
||||
* unbounded values)
|
||||
* @exception MathIllegalArgumentException if lower and upper bounds are not
|
||||
* @exception DimensionMismatchException if lower and upper bounds are not
|
||||
* consistent, either according to dimension or to values
|
||||
*/
|
||||
public MultivariateFunctionMappingAdapter(final MultivariateFunction bounded,
|
||||
|
@ -151,8 +150,7 @@ public class MultivariateFunctionMappingAdapter implements MultivariateFunction
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Map an array from bounded to unbounded.
|
||||
/** Map an array from bounded to unbounded.
|
||||
* @param point bounded value
|
||||
* @return unbounded value
|
||||
*/
|
||||
|
@ -174,6 +172,8 @@ public class MultivariateFunctionMappingAdapter implements MultivariateFunction
|
|||
* set up at construction and calls the underlying function using
|
||||
* the bounded point.
|
||||
* </p>
|
||||
* @param point unbounded value
|
||||
* @return underlying function value
|
||||
* @see #unboundedToBounded(double[])
|
||||
*/
|
||||
public double value(double[] point) {
|
||||
|
@ -181,19 +181,19 @@ public class MultivariateFunctionMappingAdapter implements MultivariateFunction
|
|||
}
|
||||
|
||||
/** Mapping interface. */
|
||||
private static interface Mapper {
|
||||
private interface Mapper {
|
||||
|
||||
/** Map a value from unbounded to bounded.
|
||||
* @param y unbounded value
|
||||
* @return bounded value
|
||||
*/
|
||||
public double unboundedToBounded(double y);
|
||||
double unboundedToBounded(double y);
|
||||
|
||||
/** Map a value from bounded to unbounded.
|
||||
* @param x bounded value
|
||||
* @return unbounded value
|
||||
*/
|
||||
public double boundedToUnbounded(double x);
|
||||
double boundedToUnbounded(double x);
|
||||
|
||||
}
|
||||
|
||||
|
@ -259,12 +259,12 @@ public class MultivariateFunctionMappingAdapter implements MultivariateFunction
|
|||
public double unboundedToBounded(final double y) {
|
||||
return upper - FastMath.exp(-y);
|
||||
}
|
||||
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double boundedToUnbounded(final double x) {
|
||||
return -FastMath.log(upper - x);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/** Local class for lower and bounds mapping. */
|
||||
|
|
|
@ -19,7 +19,6 @@ package org.apache.commons.math.optimization.direct;
|
|||
|
||||
import org.apache.commons.math.analysis.MultivariateFunction;
|
||||
import org.apache.commons.math.exception.DimensionMismatchException;
|
||||
import org.apache.commons.math.exception.MathIllegalArgumentException;
|
||||
import org.apache.commons.math.exception.NumberIsTooSmallException;
|
||||
import org.apache.commons.math.util.FastMath;
|
||||
import org.apache.commons.math.util.MathUtils;
|
||||
|
@ -117,7 +116,7 @@ public class MultivariateFunctionPenaltyAdapter implements MultivariateFunction
|
|||
* unbounded values)
|
||||
* @param offset base offset of the penalty function
|
||||
* @param scale scale of the penalty function
|
||||
* @exception MathIllegalArgumentException if lower bounds, upper bounds and
|
||||
* @exception DimensionMismatchException if lower bounds, upper bounds and
|
||||
* scales are not consistent, either according to dimension or to bounadary
|
||||
* values
|
||||
*/
|
||||
|
@ -157,6 +156,7 @@ public class MultivariateFunctionPenaltyAdapter implements MultivariateFunction
|
|||
* a replacement value using the offset and scale if bounds are
|
||||
* violated, without calling the function at all.
|
||||
* </p>
|
||||
* @param point unbounded point
|
||||
* @return either underlying function value or penalty function value
|
||||
*/
|
||||
public double value(double[] point) {
|
||||
|
|
|
@ -409,7 +409,7 @@ class SimplexTableau implements Serializable {
|
|||
Integer basicRow = getBasicRow(colIndex);
|
||||
if (basicRow != null && basicRow == 0) {
|
||||
// if the basic row is found to be the objective function row
|
||||
// set the coefficient to 0 -> this case handles unconstrained
|
||||
// set the coefficient to 0 -> this case handles unconstrained
|
||||
// variables that are still part of the objective function
|
||||
coefficients[i] = 0;
|
||||
} else if (basicRows.contains(basicRow)) {
|
||||
|
|
Loading…
Reference in New Issue