commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject git commit: Fixed error in interpolation example.
Date Mon, 29 Sep 2014 14:35:08 GMT
Repository: commons-math
Updated Branches:
  refs/heads/master 2a59e0ef4 -> 5918daf87


Fixed error in interpolation example.

Thanks to Guylaine Prat for finding the error.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/5918daf8
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/5918daf8
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/5918daf8

Branch: refs/heads/master
Commit: 5918daf872b1dbe3af6688e7f14477432d15cb7e
Parents: 2a59e0e
Author: Luc Maisonobe <luc@apache.org>
Authored: Mon Sep 29 16:34:44 2014 +0200
Committer: Luc Maisonobe <luc@apache.org>
Committed: Mon Sep 29 16:34:44 2014 +0200

----------------------------------------------------------------------
 src/site/xdoc/userguide/analysis.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/5918daf8/src/site/xdoc/userguide/analysis.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/userguide/analysis.xml b/src/site/xdoc/userguide/analysis.xml
index 4a09acb..90187ac 100644
--- a/src/site/xdoc/userguide/analysis.xml
+++ b/src/site/xdoc/userguide/analysis.xml
@@ -391,11 +391,11 @@ double c = UnivariateSolverUtils.forceSide(100, function,
         </p>
         <p>Typical usage:</p>
         <source>double x[] = { 0.0, 1.0, 2.0 };
-double y[] = { 1.0, -1.0, 2.0);
+double y[] = { 1.0, -1.0, 2.0};
 UnivariateInterpolator interpolator = new SplineInterpolator();
 UnivariateFunction function = interpolator.interpolate(x, y);
 double interpolationX = 0.5;
-double interpolatedY = function.evaluate(x);
+double interpolatedY = function.value(x);
 System.out println("f(" + interpolationX + ") = " + interpolatedY);</source>
         <p>
           A natural cubic spline is a function consisting of a polynomial of


Mime
View raw message