Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,6 @@ Additional Resources
+ [Apache Commons Homepage](https://commons.apache.org/)
+ [Apache Bugtracker (JIRA)](https://issues.apache.org/jira/)
+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
+ #apachecommons IRC channel on freenode.org
+ `#apache-commons` IRC channel on `irc.freenode.org`

[ml]:https://commons.apache.org/mail-lists.html
2 changes: 1 addition & 1 deletion src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3779,7 +3779,7 @@ are simply solved by adjusting the import statements in users code.">
static methods to create instances and execute tests.
</action>
<action dev="psteitz" type="update" issue="MATH-95" due-to="Paul Field">
Eliminated repeated endpoint function evalutations in BrentSolver, SecantSolver.
Eliminated repeated endpoint function evaluations in BrentSolver, SecantSolver.
</action>
<action dev="psteitz" type="update" issue="MATH-137" due-to="Rodrigo di Lorenzo Lopes">
Added setSubMatrix methods to RealMatrixImpl, BigMatrixImpl. To
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class GaussIntegratorFactory {
* The call to the
* {@link GaussIntegrator#integrate(org.apache.commons.math4.analysis.UnivariateFunction)
* integrate} method will perform an integration on the interval
* \([0, +\infty)\): the computed value is the improper integral of
* \([0, +\infinity)\): the computed value is the improper integral of
* \(e^{-x} f(x)\)
* where \(f(x)\) is the function passed to the
* {@link SymmetricGaussIntegrator#integrate(org.apache.commons.math4.analysis.UnivariateFunction)
Expand Down Expand Up @@ -131,7 +131,7 @@ public GaussIntegrator legendreHighPrecision(int numberOfPoints,
* The call to the
* {@link SymmetricGaussIntegrator#integrate(org.apache.commons.math4.analysis.UnivariateFunction)
* integrate} method will perform a weighted integration on the interval
* \([-\infty, +\infty]\): the computed value is the improper integral of
* \([-\infinity, +\infinity]\): the computed value is the improper integral of
* \(e^{-x^2}f(x)\)
* where \(f(x)\) is the function passed to the
* {@link SymmetricGaussIntegrator#integrate(org.apache.commons.math4.analysis.UnivariateFunction)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public LoessInterpolator(double bandwidth, int robustnessIters, double accuracy)
* @throws NotFiniteNumberException if any of the arguments and values are
* not finite real numbers.
* @throws NumberIsTooSmallException if the bandwidth is too small to
* accomodate the size of the input data (i.e. the bandwidth must be
* accommodate the size of the input data (i.e. the bandwidth must be
* larger than 2/n).
*/
@Override
Expand Down Expand Up @@ -207,7 +207,7 @@ public final PolynomialSplineFunction interpolate(final double[] xval,
* @throws NotFiniteNumberException if any of the arguments and values are
not finite real numbers.
* @throws NumberIsTooSmallException if the bandwidth is too small to
* accomodate the size of the input data (i.e. the bandwidth must be
* accommodate the size of the input data (i.e. the bandwidth must be
* larger than 2/n).
* @since 2.1
*/
Expand Down Expand Up @@ -376,7 +376,7 @@ public final double[] smooth(final double[] xval, final double[] yval,
* @throws NotFiniteNumberException if any of the arguments and values are
* not finite real numbers.
* @throws NumberIsTooSmallException if the bandwidth is too small to
* accomodate the size of the input data (i.e. the bandwidth must be
* accommodate the size of the input data (i.e. the bandwidth must be
* larger than 2/n).
*/
public final double[] smooth(final double[] xval, final double[] yval)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public class TricubicInterpolatingFunction
private final double[] yval;
/** Samples z-coordinates */
private final double[] zval;
/** Set of cubic splines pacthing the whole data grid */
/** Set of cubic splines patching the whole data grid */
private final TricubicFunction[][][] splines;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public interface UnivariateInterpolator {
* @throws MathIllegalArgumentException
* if the arguments violate assumptions made by the interpolation
* algorithm.
* @throws DimensionMismatchException if arrays lengthes do not match
* @throws DimensionMismatchException if arrays lengths do not match
*/
UnivariateFunction interpolate(double xval[], double yval[])
throws MathIllegalArgumentException, DimensionMismatchException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class UnivariatePeriodicInterpolator
* @param period Period.
* @param extend Number of points to be appended at the beginning and
* end of the sample arrays in order to avoid interpolation failure at
* the (periodic) boundaries of the orginal interval. The value is the
* the (periodic) boundaries of the original interval. The value is the
* number of sample points which the original {@code interpolator} needs
* on each side of the interpolated point.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public Complex parse(String source) throws MathParseException {
* Parses a string to produce a {@link Complex} object.
*
* @param source the string to parse
* @param pos input/ouput parsing parameter.
* @param pos input/output parsing parameter.
* @return the parsed {@link Complex} object.
*/
public Complex parse(String source, ParsePosition pos) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public enum LocalizedFormats implements Localizable {
OVERFLOW_IN_MULTIPLICATION("overflow in multiplication: {0} * {1}"),
PERCENTILE_IMPLEMENTATION_CANNOT_ACCESS_METHOD("cannot access {0} method in percentile implementation {1}"),
PERCENTILE_IMPLEMENTATION_UNSUPPORTED_METHOD("percentile implementation {0} does not support {1}"),
PERMUTATION_EXCEEDS_N("permutation size ({0}) exceeds permuation domain ({1})"), /* keep */
PERMUTATION_EXCEEDS_N("permutation size ({0}) exceeds permutation domain ({1})"), /* keep */
POLYNOMIAL("polynomial"), /* keep */
POLYNOMIAL_INTERPOLANTS_MISMATCH_SEGMENTS("number of polynomial interpolants must match the number of segments ({0} != {1} - 1)"),
POPULATION_LIMIT_NOT_POSITIVE("population limit has to be positive"),
Expand Down Expand Up @@ -357,7 +357,7 @@ public enum LocalizedFormats implements Localizable {
VALUES_ADDED_BEFORE_CONFIGURING_STATISTIC("{0} values have been added before statistic is configured"),
VECTOR_LENGTH_MISMATCH("vector length mismatch: got {0} but expected {1}"),
VECTOR_MUST_HAVE_AT_LEAST_ONE_ELEMENT("vector must have at least one element"),
WEIGHT_AT_LEAST_ONE_NON_ZERO("weigth array must contain at least one non-zero value"),
WEIGHT_AT_LEAST_ONE_NON_ZERO("weight array must contain at least one non-zero value"),
WRONG_BLOCK_LENGTH("wrong array shape (block length = {0}, expected {1})"),
WRONG_NUMBER_OF_POINTS("{0} points are required, got only {1}"),
NUMBER_OF_POINTS("number of points ({0})"), /* keep */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public double[] gradient(double x, double ... p) {
private final int maxIter;

/**
* Contructor used by the factory methods.
* Constructor used by the factory methods.
*
* @param initialGuess Initial guess. If set to {@code null}, the initial guess
* will be estimated using the {@link ParameterGuesser}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class HarmonicCurveFitter extends AbstractCurveFitter {
private final int maxIter;

/**
* Contructor used by the factory methods.
* Constructor used by the factory methods.
*
* @param initialGuess Initial guess. If set to {@code null}, the initial guess
* will be estimated using the {@link ParameterGuesser}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class PolynomialCurveFitter extends AbstractCurveFitter {
private final int maxIter;

/**
* Contructor used by the factory methods.
* Constructor used by the factory methods.
*
* @param initialGuess Initial guess.
* @param maxIter Maximum number of iterations of the optimization algorithm.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class SimpleCurveFitter extends AbstractCurveFitter {
private final int maxIter;

/**
* Contructor used by the factory methods.
* Constructor used by the factory methods.
*
* @param function Function to fit.
* @param initialGuess Initial guess. Cannot be {@code null}. Its length must
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class DenseWeightedEvaluation extends AbstractEvaluation {
/**
* Create a weighted evaluation from an unweighted one.
*
* @param unweighted the evalutation before weights are applied
* @param unweighted the evaluation before weights are applied
* @param weightSqrt the matrix square root of the weight matrix
*/
DenseWeightedEvaluation(final Evaluation unweighted,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public interface SelectionPolicy {
/**
* Select two chromosomes from the population.
* @param population the population from which the chromosomes are choosen.
* @param population the population from which the chromosomes are chosen.
* @return the selected chromosomes.
* @throws MathIllegalArgumentException if the population is not compatible with this {@link SelectionPolicy}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* suggests that it is more exploratory and results in a larger part of the
* problem space being searched.
* <p>
* This crossover policy evaluates each gene of the parent chromosomes by chosing a
* This crossover policy evaluates each gene of the parent chromosomes by choosing a
* uniform random number {@code p} in the range [0, 1]. If {@code p} &lt; {@code ratio},
* the parent genes are swapped. This means with a ratio of 0.7, 30% of the genes from the
* first parent and 70% from the second parent will be selected for the first offspring (and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class NotARotationMatrixException

/**
* Simple constructor.
* Build an exception by translating and formating a message
* Build an exception by translating and formatting a message
* @param specifier format specifier (to be translated)
* @param parts to insert in the format (no translation)
* @since 2.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public DefaultIterativeLinearSolverEvent(final Object source, final int iteratio
* Therefore the user must make sure that these vectors are either
* unmodifiable views or deep copies of the same vectors actually used by
* the {@code source}. Failure to do so may compromise subsequent iterations
* of the {@code source}. Callling {@link #getResidual()} on instances
* of the {@code source}. Calling {@link #getResidual()} on instances
* returned by this constructor throws a
* {@link MathUnsupportedOperationException}, while
* {@link #providesResidual()} returns {@code false}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public IterativeLinearSolverEvent(final Object source, final int iterations) {
* </ul>
* <p>
* The default implementation throws a
* {@link MathUnsupportedOperationException}. If this method is overriden,
* then {@link #providesResidual()} should be overriden as well.
* {@link MathUnsupportedOperationException}. If this method is overridden,
* then {@link #providesResidual()} should be overridden as well.
* </p>
*
* @return the updated residual, r
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public RealMatrix parse(String source) {
* Parse a string to produce a {@link RealMatrix} object.
*
* @param source String to parse.
* @param pos input/ouput parsing parameter.
* @param pos input/output parsing parameter.
* @return the parsed {@link RealMatrix} object.
*/
public RealMatrix parse(String source, ParsePosition pos) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/apache/commons/math4/linear/RealVector.java
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ public void setIndex(int index) {
* coordinates.
* </p>
* <p>
* This method <em>must</em> be overriden by concrete subclasses of
* This method <em>must</em> be overridden by concrete subclasses of
* {@link RealVector} (the current implementation throws an exception).
* </p>
*
Expand All @@ -1100,7 +1100,7 @@ public boolean equals(Object other)
}

/**
* {@inheritDoc}. This method <em>must</em> be overriden by concrete
* {@inheritDoc}. This method <em>must</em> be overridden by concrete
* subclasses of {@link RealVector} (current implementation throws an
* exception).
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public ArrayRealVector parse(String source) {
* Parse a string to produce a {@link RealVector} object.
*
* @param source String to parse.
* @param pos input/ouput parsing parameter.
* @param pos input/output parsing parameter.
* @return the parsed {@link RealVector} object.
*/
public ArrayRealVector parse(String source, ParsePosition pos) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ public void visit(final int row, final int column,
* Returns the L<sub>2</sub> norm of the matrix.
* <p>The L<sub>2</sub> norm is max(|A &times; u|<sub>2</sub> /
* |u|<sub>2</sub>), where |.|<sub>2</sub> denotes the vectorial 2-norm
* (i.e. the traditional euclidian norm).</p>
* (i.e. the traditional euclidean norm).</p>
* @return norm
*/
public double getNorm() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private double[][] individualDistances(NeuronSquareMesh2D map) {
}

// 2.
// Fill the bottom-rigth slot of each unit's location with the average
// Fill the bottom-right slot of each unit's location with the average
// of the distances between
// * the current unit and its bottom-right neighbour, and
// * the bottom-center neighbour and the right neighbour.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public void append(final ContinuousOutputFieldModel<T> model)

/** Check dimensions equality.
* @param d1 first dimension
* @param d2 second dimansion
* @param d2 second dimension
* @exception DimensionMismatchException if dimensions do not match
*/
private void checkDimensionsEquality(final int d1, final int d2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ protected T[] derivativeLinearCombination(final T ... coefficients) {
/** Linearly combine arrays.
* @param a array to add to
* @param coefficients coefficients to apply to the method staged derivatives
* @return a itself, as a conveniency for fluent API
* @return a itself, as a convenience for fluent API
*/
@SuppressWarnings("unchecked")
private T[] combine(final T[] a, final T ... coefficients) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/apache/commons/math4/optim/MaxEval.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
* @since 3.1
*/
public class MaxEval implements OptimizationData {
/** Allowed number of evalutations. */
/** Allowed number of evaluations. */
private final int maxEval;

/**
* @param max Allowed number of evalutations.
* @param max Allowed number of evaluations.
* @throws NotStrictlyPositiveException if {@code max <= 0}.
*/
public MaxEval(int max) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/apache/commons/math4/optim/MaxIter.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @since 3.1
*/
public class MaxIter implements OptimizationData {
/** Allowed number of evalutations. */
/** Allowed number of evaluations. */
private final int maxIter;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public SimplePointChecker(final double relativeThreshold,
* @param iteration Index of current iteration
* @param previous Best point in the previous iteration.
* @param current Best point in the current iteration.
* @return {@code true} if the arguments satify the convergence criterion.
* @return {@code true} if the arguments satisfy the convergence criterion.
*/
@Override
public boolean converged(final int iteration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public SimpleVectorValueChecker(final double relativeThreshold,
* @param iteration Index of current iteration
* @param previous Best point in the previous iteration.
* @param current Best point in the current iteration.
* @return {@code true} if the arguments satify the convergence criterion.
* @return {@code true} if the arguments satisfy the convergence criterion.
*/
@Override
public boolean converged(final int iteration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public class MultivariateFunctionPenaltyAdapter
* @param offset base offset of the penalty function
* @param scale scale of the penalty function
* @exception DimensionMismatchException if lower bounds, upper bounds and
* scales are not consistent, either according to dimension or to bounadary
* scales are not consistent, either according to dimension or to boundary
* values
*/
public MultivariateFunctionPenaltyAdapter(final MultivariateFunction bounded,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ private void initializeCMA(double[] guess) {
ccovmuSep = FastMath.min(1 - ccov1, ccovmu * (dimension + 1.5) / 3);
chiN = FastMath.sqrt(dimension) *
(1 - 1 / ((double) 4 * dimension) + 1 / ((double) 21 * dimension * dimension));
// intialize CMA internal values - updated each generation
// initialize CMA internal values - updated each generation
xmean = MatrixUtils.createColumnRealMatrix(guess); // objective variables
diagD = insigma.scalarMultiply(1 / sigma);
diagC = square(diagD);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ public void search(UnivariateFunction func,
}

/**
* @return the number of evalutations.
* @return the number of evaluations.
*/
public int getMaxEvaluations() {
return maxEvaluations;
}

/**
* @return the number of evalutations.
* @return the number of evaluations.
*/
public int getEvaluations() {
return evaluations;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public PearsonsCorrelation(RealMatrix covarianceMatrix, int numberOfObservations
/**
* Returns the correlation matrix.
*
* <p>This method will return null if the argumentless constructor was used
* <p>This method will return null if the non-argument constructor was used
* to create this instance, even if {@link #computeCorrelationMatrix(double[][])}
* has been called before it is activated.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public long getN() {
return moment.getN();
}

/* UnvariateStatistic Approach */
/* UinvariateStatistic Approach */

/**
* Returns the kurtosis of the entries in the specified portion of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public SemiVariance() {
* property and default (Downside) <code>varianceDirection</code> property.
*
* @param biasCorrected setting for bias correction - true means
* bias will be corrected and is equivalent to using the argumentless
* bias will be corrected and is equivalent to using the non-argument
* constructor
*/
public SemiVariance(final boolean biasCorrected) {
Expand All @@ -115,7 +115,7 @@ public SemiVariance(final Direction direction) {
* property and the specified <code>Direction</code> property.
*
* @param corrected setting for bias correction - true means
* bias will be corrected and is equivalent to using the argumentless
* bias will be corrected and is equivalent to using the non-argument
* constructor
*
* @param direction setting for the direction of the SemiVariance
Expand Down
Loading