fixed checkstyle warnings

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@824760 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2009-10-13 13:48:52 +00:00
parent 2c8a114f76
commit 50e9a948aa
3 changed files with 10 additions and 12 deletions

View File

@ -16,17 +16,16 @@
*/
package org.apache.commons.math.analysis.interpolation;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.math.DimensionMismatchException;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.FunctionEvaluationException;
import org.apache.commons.math.analysis.MultivariateRealFunction;
import org.apache.commons.math.linear.RealVector;
import org.apache.commons.math.linear.ArrayRealVector;
import org.apache.commons.math.linear.RealVector;
import org.apache.commons.math.random.UnitSphereRandomVectorGenerator;
/**
@ -184,8 +183,7 @@ public class MicrosphereInterpolatingFunction
* @param point Interpolation point.
* @return the interpolated value.
*/
public double value(double[] point)
throws FunctionEvaluationException {
public double value(double[] point) {
final RealVector p = new ArrayRealVector(point);
@ -235,6 +233,7 @@ public class MicrosphereInterpolatingFunction
*
* @param v Vector.
* @param w Vector.
* @return cosine of the angle
*/
private double cosAngle(final RealVector v, final RealVector w) {
return v.dotProduct(w) / (v.getNorm() * w.getNorm());

View File

@ -107,16 +107,16 @@ public class MicrosphereInterpolator
/**
* Set the number of microsphere elements.
* @param microsphereElements Number of surface elements of the microsphere.
* @param elements Number of surface elements of the microsphere.
* @throws IllegalArgumentException if {@code microsphereElements <= 0}.
*/
public void setMicropshereElements(final int microsphereElements) {
public void setMicropshereElements(final int elements) {
if (microsphereElements < 0) {
throw MathRuntimeException.createIllegalArgumentException(
"number of microsphere elements must be positive, but got {0}",
microsphereElements);
}
this.microsphereElements = microsphereElements;
this.microsphereElements = elements;
}
}

View File

@ -21,7 +21,7 @@ import org.apache.commons.math.analysis.MultivariateRealFunction;
/**
* Interface representing a univariate real interpolating function.
*
*
* @version $Revision$ $Date$
*/
public interface MultivariateRealInterpolator {
@ -40,7 +40,6 @@ public interface MultivariateRealInterpolator {
* interpolation algorithm or some dimension mismatch occurs
* @throws IllegalArgumentException if there are no data (xval null or zero length)
*/
public MultivariateRealFunction interpolate(double[][] xval,
double[] yval)
MultivariateRealFunction interpolate(double[][] xval, double[] yval)
throws MathException, IllegalArgumentException;
}