cvs commit: jakarta-commons/math/src/test/org/apache/commons/math/analysis InterpolatorTest.java

2004-02-16 Thread psteitz
psteitz 2004/02/16 20:33:16

  Modified:math/src/test/org/apache/commons/math/analysis
InterpolatorTest.java
  Log:
  Restored test code inadvertently deleted with last commit.
  
  Revision  ChangesPath
  1.12  +26 -1 
jakarta-commons/math/src/test/org/apache/commons/math/analysis/InterpolatorTest.java
  
  Index: InterpolatorTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/analysis/InterpolatorTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- InterpolatorTest.java 16 Feb 2004 06:30:21 -  1.11
  +++ InterpolatorTest.java 17 Feb 2004 04:33:16 -  1.12
  @@ -47,7 +47,9 @@
   double yval[] = { 0.0, 0.5, 1.0 };
   UnivariateRealInterpolator i = new SplineInterpolator();
   UnivariateRealFunction f = i.interpolate(xval, yval);
  +
   /*  todo: rewrite using assertions
  +
   double x;
   x = 0.0;
   System.out.println(
  @@ -79,6 +81,29 @@
   double yval[] = { 0.0, 0.5, 1.0, 1.5 };
   UnivariateRealInterpolator i = new SplineInterpolator();
   UnivariateRealFunction f = i.interpolate(xval, yval);
  +/* todo: rewrite with assertions
  +double x;
  +x = 0.0;
  +System.out.println(
  +x=
  ++ x
  ++  y=
  ++ f.value(x));
  +
  +x = 0.5;
  +System.out.println(
  +x=
  ++ x
  ++  y=
  ++ f.value(x));
  +
  +x = 1 - 1E-6;
  +System.out.println(
  +x=
  ++ x
  ++  y=
  ++ f.value(x));
  +*/
   
   }
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/math/src/test/org/apache/commons/math/analysis InterpolatorTest.java

2003-11-15 Thread dirkv
dirkv   2003/11/15 11:04:28

  Modified:math/src/test/org/apache/commons/math/analysis
InterpolatorTest.java
  Log:
PR: http://www.mail-archive.com/[EMAIL PROTECTED]/msg29959.html
Submitted by:   Matt Cliff
Reviewed by:Mark Diggory
  
  Revision  ChangesPath
  1.8   +41 -106   
jakarta-commons/math/src/test/org/apache/commons/math/analysis/InterpolatorTest.java
  
  Index: InterpolatorTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/analysis/InterpolatorTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- InterpolatorTest.java 14 Nov 2003 22:22:16 -  1.7
  +++ InterpolatorTest.java 15 Nov 2003 19:04:28 -  1.8
  @@ -89,31 +89,21 @@
   x=
   + x
   +  y=
  -+ f.value(x)
  -+  y'=
  -+ f.firstDerivative(x)
  -+  y''=
  -+ f.secondDerivative(x));
  ++ f.value(x));
  +
   x = 0.5;
   System.out.println(
   x=
   + x
   +  y=
  -+ f.value(x)
  -+  y'=
  -+ f.firstDerivative(x)
  -+  y''=
  -+ f.secondDerivative(x));
  ++ f.value(x));
  +
   x = 1 - 1E-6;
   System.out.println(
   x=
   + x
   +  y=
  -+ f.value(x)
  -+  y'=
  -+ f.firstDerivative(x)
  -+  y''=
  -+ f.secondDerivative(x));
  ++ f.value(x));
   }
   
   public void testInterpolateLinearDegenerateThreeSegment()
  @@ -129,61 +119,43 @@
   x=
   + x
   +  y=
  -+ f.value(x)
  -+  y'=
  -+ f.firstDerivative(x)
  -+  y''=
  -+ f.secondDerivative(x));
  ++ f.value(x));
  +
   x = 0.5 - 1E-6;
   System.out.println(
   x=
   + x
   +  y=
  -+ f.value(x)
  -+  y'=
  -+ f.firstDerivative(x)
  -+  y''=
  -+ f.secondDerivative(x));
  ++ f.value(x));
  +
   x = 0.5;
   System.out.println(
   x=
   + x
   +  y=
  -+ f.value(x)
  -+  y'=
  -+ f.firstDerivative(x)
  -+  y''=
  -+ f.secondDerivative(x));
  ++ f.value(x));
  +
   x = 1 - 1E-6;
   System.out.println(
   x=
   + x
   +  y=
  -+ f.value(x)
  -+  y'=
  -+ f.firstDerivative(x)
  -+  y''=
  -+ f.secondDerivative(x));
  ++ f.value(x));
  +
   x = 1;
   System.out.println(
   x=
   + x
   +  y=
  -+ f.value(x)
  -+  y'=
  -+ f.firstDerivative(x)
  -+  y''=
  -+ f.secondDerivative(x));
  ++ f.value(x));
  +
   x = 1.5 - 1E-6;
   System.out.println(
   x=
   + x
   +  y=
  -+ f.value(x)
  -+  y'=
  -+ f.firstDerivative(x)
  -+  y''=
  -+ f.secondDerivative(x));
  ++ f.value(x));
  +
   }
   
   public void testInterpolateLinear() throws MathException {
  @@ -198,41 +170,28 @@
   x=
   + x
   +  y=
  -+ f.value(x)
  -+  y'=
  -+ f.firstDerivative(x)
  -+  y''=
  -+ f.secondDerivative(x));
  ++ f.value(x));
  +
   x = 0.5 - 1E-6;
   System.out.println(
   x=
   + x
   +  y=
  -+ f.value(x)
  -+  y'=
  -+ f.firstDerivative(x)
  -+  y''=
  -+ f.secondDerivative(x));
  ++ f.value(x));
  +
   x = 0.5;
   System.out.println(
   x=
   + x
   +  y=
  -+ f.value(x)
  -+  y'=
  -+ f.firstDerivative(x)
  -+  y''=
  -+ f.secondDerivative(x));
  ++ f.value(x));
  +
   x = 1 - 1E-6;
   System.out.println(
   x=
   + x
   +  y=