fixed checkstyle and findbugs errors

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@758912 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2009-03-26 23:00:27 +00:00
parent 5404d5e1a2
commit b2db570b31
4 changed files with 8 additions and 4 deletions

View File

@ -27,7 +27,7 @@
<!-- which already know about limited precision of the double numbers -->
<Match>
<Class name="org.apache.commons.math.optimization.univariate.BrentOptimizer" />
<Method name="localMin" params="double,double,double,double,org.apache.commons.math.analysis.UnivariateRealFunction" returns="double" />
<Method name="localMin" params="org.apache.commons.math.analysis.UnivariateRealFunction,org.apache.commons.math.optimization.GoalType,double,double,double,double" returns="double" />
<Bug pattern="FE_FLOATING_POINT_EQUALITY" />
</Match>
<Match>
@ -44,7 +44,6 @@
<Bug pattern="FE_FLOATING_POINT_EQUALITY" />
</Match>
<!-- The following equality test is intentional and needed for rounding purposes -->
<Match>
<Class name="org.apache.commons.math.util.MathUtils" />

View File

@ -66,7 +66,7 @@ public abstract class AbstractContinuousDistribution
// subclasses can overide if there is a better method.
UnivariateRealFunction rootFindingFunction =
new UnivariateRealFunction() {
private static final long serialVersionUID = 1043729002768873023L;
public double value(double x) throws FunctionEvaluationException {
try {
return cumulativeProbability(x) - p;

View File

@ -16,6 +16,8 @@
*/
package org.apache.commons.math.linear;
import java.io.Serializable;
/**
* Interface defining a real-valued vector with basic algebraic operations.
* <p>
@ -39,7 +41,7 @@ package org.apache.commons.math.linear;
* @version $Revision$ $Date$
* @since 2.0
*/
public interface RealVector {
public interface RealVector extends Serializable {
/**
* Returns a (deep) copy of this.

View File

@ -27,6 +27,9 @@ import org.apache.commons.math.util.OpenIntToDoubleHashMap.Iterator;
*/
public class SparseRealVector implements RealVector {
/** Serializable version identifier. */
private static final long serialVersionUID = 8772222695580707260L;
/** Default Tolerance for having a value considered zero. */
public static final double DEFAULT_ZERO_TOLERANCE = 1.0e-12;