fixed warnings about serial version ID

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@766874 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2009-04-20 20:58:33 +00:00
parent 514f67b19b
commit 60d921afe9
4 changed files with 9 additions and 0 deletions

View File

@ -25,6 +25,8 @@ import org.apache.commons.math.FunctionEvaluationException;
*/
public class Expm1Function implements DifferentiableUnivariateRealFunction {
private static final long serialVersionUID = 1410052725961159179L;
public double value(double x) throws FunctionEvaluationException {
// Math.expm1() is available in jdk 1.5 but not in jdk 1.4.2.
return Math.exp(x) - 1.0;
@ -32,6 +34,7 @@ public class Expm1Function implements DifferentiableUnivariateRealFunction {
public UnivariateRealFunction derivative() {
return new UnivariateRealFunction() {
private static final long serialVersionUID = 5621329502844531460L;
public double value(double x) throws FunctionEvaluationException {
return Math.exp(x);
}

View File

@ -25,6 +25,8 @@ import org.apache.commons.math.FunctionEvaluationException;
*/
public class MonitoredFunction implements UnivariateRealFunction {
private static final long serialVersionUID = -8403645545888892674L;
public MonitoredFunction(UnivariateRealFunction f) {
callsCount = 0;
this.f = f;

View File

@ -38,6 +38,7 @@ public class QuinticFunction implements DifferentiableUnivariateRealFunction, Se
public UnivariateRealFunction derivative() {
return new UnivariateRealFunction() {
private static final long serialVersionUID = 5265867813333370L;
public double value(double x) throws FunctionEvaluationException {
return (5*x*x-3.75)*x*x+0.25;
}

View File

@ -30,6 +30,8 @@ import org.apache.commons.math.FunctionEvaluationException;
*/
public class SinFunction implements DifferentiableUnivariateRealFunction {
private static final long serialVersionUID = 6422911699694536977L;
/* Evaluate sinus fuction.
* @see org.apache.commons.math.UnivariateRealFunction#value(double)
*/
@ -41,6 +43,7 @@ public class SinFunction implements DifferentiableUnivariateRealFunction {
*/
public UnivariateRealFunction derivative() {
return new UnivariateRealFunction() {
private static final long serialVersionUID = -309931502404170015L;
public double value(double x) throws FunctionEvaluationException {
return Math.cos(x);
}