/usr/share/doc/libghc-hmatrix-gsl-doc/html/Numeric-GSL-Interpolation.html is in libghc-hmatrix-gsl-doc 0.18.0.1-1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Numeric.GSL.Interpolation</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Numeric-GSL-Interpolation.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Numeric-GSL-Interpolation.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hmatrix-gsl-0.18.0.1: Numerical computation</p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>(c) Matthew Peddie 2015</td></tr><tr><th>License</th><td>GPL</td></tr><tr><th>Maintainer</th><td>Alberto Ruiz</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Numeric.GSL.Interpolation</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Interpolation methods</a></li><li><a href="#g:2">Evaluation of interpolated functions</a></li><li><a href="#g:3">Evaluation of derivatives of interpolated functions</a></li><li><a href="#g:4">Evaluation of integrals of interpolated functions</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Interpolation routines.</p><p><a href="https://www.gnu.org/software/gsl/manual/html_node/Interpolation.html#Interpolation">https://www.gnu.org/software/gsl/manual/html_node/Interpolation.html#Interpolation</a></p><p>The GSL routines <code>gsl_spline_eval</code> and friends are used, but in spite
of the names, they are not restricted to spline interpolation. The
functions in this module will work for any <code><a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a></code>.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:InterpolationMethod">InterpolationMethod</a><ul class="subs"><li>= <a href="#v:Linear">Linear</a></li><li>| <a href="#v:Polynomial">Polynomial</a></li><li>| <a href="#v:CSpline">CSpline</a></li><li>| <a href="#v:CSplinePeriodic">CSplinePeriodic</a></li><li>| <a href="#v:Akima">Akima</a></li><li>| <a href="#v:AkimaPeriodic">AkimaPeriodic</a></li></ul></li><li class="src short"><a href="#v:evaluate">evaluate</a> :: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> -> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>)] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:evaluateV">evaluateV</a> :: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> -> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:evaluateDerivative">evaluateDerivative</a> :: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> -> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>)] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:evaluateDerivative2">evaluateDerivative2</a> :: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> -> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>)] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:evaluateDerivativeV">evaluateDerivativeV</a> :: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> -> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:evaluateDerivative2V">evaluateDerivative2V</a> :: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> -> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:evaluateIntegral">evaluateIntegral</a> :: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> -> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>)] -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:evaluateIntegralV">evaluateIntegralV</a> :: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> -> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></li></ul></div><div id="interface"><h1 id="g:1">Interpolation methods</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:InterpolationMethod" class="def">InterpolationMethod</a> <a href="src/Numeric-GSL-Interpolation.html#InterpolationMethod" class="link">Source</a> <a href="#t:InterpolationMethod" class="selflink">#</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Linear" class="def">Linear</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:Polynomial" class="def">Polynomial</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:CSpline" class="def">CSpline</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:CSplinePeriodic" class="def">CSplinePeriodic</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:Akima" class="def">Akima</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:AkimaPeriodic" class="def">AkimaPeriodic</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:InterpolationMethod" class="caption collapser" onclick="toggleSection('i:InterpolationMethod')">Instances</p><div id="section.i:InterpolationMethod" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:InterpolationMethod:Eq:1" class="instance expander" onclick="toggleSection('i:id:InterpolationMethod:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a></span> <a href="src/Numeric-GSL-Interpolation.html#line-55" class="link">Source</a> <a href="#t:InterpolationMethod" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:InterpolationMethod:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> -> <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> -> <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:InterpolationMethod:Read:2" class="instance expander" onclick="toggleSection('i:id:InterpolationMethod:Read:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Read.html#t:Read">Read</a> <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a></span> <a href="src/Numeric-GSL-Interpolation.html#line-55" class="link">Source</a> <a href="#t:InterpolationMethod" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:InterpolationMethod:Read:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a>] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a>] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:InterpolationMethod:Show:3" class="instance expander" onclick="toggleSection('i:id:InterpolationMethod:Show:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a></span> <a href="src/Numeric-GSL-Interpolation.html#line-55" class="link">Source</a> <a href="#t:InterpolationMethod" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:InterpolationMethod:Show:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><h1 id="g:2">Evaluation of interpolated functions</h1><div class="top"><p class="src"><a id="v:evaluate" class="def">evaluate</a> <a href="src/Numeric-GSL-Interpolation.html#evaluate" class="link">Source</a> <a href="#v:evaluate" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a></td><td class="doc"><p>What method to use to interpolate</p></td></tr><tr><td class="src">-> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>)]</td><td class="doc"><p>(domain, range) values sampling the function</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Point at which to evaluate the function</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Interpolated result</p></td></tr></table></div><div class="doc"><p>Evaluate a function by interpolating within the given dataset. For
example:</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>let xs = [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>let ys map (**2) [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>evaluate Akima (zip xs ys) 2.2
</code></strong>4.840000000000001
</pre><p>To successfully <code>evaluate points x</code>, the domain (<code>x</code>) values in
<code>points</code> must be monotonically increasing. The evaluation point <code>x</code>
must lie between the smallest and largest values in the sampled
domain.</p></div></div><div class="top"><p class="src"><a id="v:evaluateV" class="def">evaluateV</a> <a href="src/Numeric-GSL-Interpolation.html#evaluateV" class="link">Source</a> <a href="#v:evaluateV" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a></td><td class="doc"><p>What method to use to interpolate</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Data points sampling the domain of the function</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Data points sampling the range of the function</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Point at which to evaluate the function</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Interpolated result</p></td></tr></table></div><div class="doc"><p>Evaluate a function by interpolating within the given dataset. For
example:</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>let xs = vector [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>let ys = vector $ map (**2) [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>evaluateV CSpline xs ys 2.2
</code></strong>4.818867924528303
</pre><p>To successfully <code>evaluateV xs ys x</code>, the vectors of corresponding
domain-range values <code>xs</code> and <code>ys</code> must have identical lengths, and
<code>xs</code> must be monotonically increasing. The evaluation point <code>x</code> must
lie between the smallest and largest values in <code>xs</code>.</p></div></div><h1 id="g:3">Evaluation of derivatives of interpolated functions</h1><div class="top"><p class="src"><a id="v:evaluateDerivative" class="def">evaluateDerivative</a> <a href="src/Numeric-GSL-Interpolation.html#evaluateDerivative" class="link">Source</a> <a href="#v:evaluateDerivative" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a></td><td class="doc"><p>What method to use to interpolate</p></td></tr><tr><td class="src">-> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>)]</td><td class="doc"><p>(domain, range) points sampling the function</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Point <code>x</code> at which to evaluate the derivative</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Interpolated result</p></td></tr></table></div><div class="doc"><p>Evaluate the derivative of a function by interpolating within the
given dataset. For example:</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>let xs = [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>let ys map (**2) [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>evaluateDerivative Akima (zip xs ys) 2.2
</code></strong>4.4
</pre><p>To successfully <code>evaluateDerivative points x</code>, the domain (<code>x</code>) values
in <code>points</code> must be monotonically increasing. The evaluation point
<code>x</code> must lie between the smallest and largest values in the sampled
domain.</p></div></div><div class="top"><p class="src"><a id="v:evaluateDerivative2" class="def">evaluateDerivative2</a> <a href="src/Numeric-GSL-Interpolation.html#evaluateDerivative2" class="link">Source</a> <a href="#v:evaluateDerivative2" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a></td><td class="doc"><p>What method to use to interpolate</p></td></tr><tr><td class="src">-> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>)]</td><td class="doc"><p>(domain, range) points sampling the function</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Point <code>x</code> at which to evaluate the second derivative</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Interpolated result</p></td></tr></table></div><div class="doc"><p>Evaluate the second derivative of a function by interpolating
within the given dataset. For example:</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>let xs = [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>let ys map (**2) [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>evaluateDerivative2 Akima (zip xs ys) 2.2
</code></strong>2.0
</pre><p>To successfully <code>evaluateDerivative2 points x</code>, the domain (<code>x</code>)
values in <code>points</code> must be monotonically increasing. The evaluation
point <code>x</code> must lie between the smallest and largest values in the
sampled domain.</p></div></div><div class="top"><p class="src"><a id="v:evaluateDerivativeV" class="def">evaluateDerivativeV</a> <a href="src/Numeric-GSL-Interpolation.html#evaluateDerivativeV" class="link">Source</a> <a href="#v:evaluateDerivativeV" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a></td><td class="doc"><p>What method to use to interpolate</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Data points <code>xs</code> sampling the domain of the function</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Data points <code>ys</code> sampling the range of the function</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Point <code>x</code> at which to evaluate the derivative</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Interpolated result</p></td></tr></table></div><div class="doc"><p>Evaluate the derivative of a function by interpolating within the
given dataset. For example:</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>let xs = vector [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>let ys = vector $ map (**2) [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>evaluateDerivativeV CSpline xs ys 2.2
</code></strong>4.338867924528302
</pre><p>To successfully <code>evaluateDerivativeV xs ys x</code>, the vectors of
corresponding domain-range values <code>xs</code> and <code>ys</code> must have identical
lengths, and <code>xs</code> must be monotonically increasing. The interpolation
point <code>x</code> must lie between the smallest and largest values in <code>xs</code>.</p></div></div><div class="top"><p class="src"><a id="v:evaluateDerivative2V" class="def">evaluateDerivative2V</a> <a href="src/Numeric-GSL-Interpolation.html#evaluateDerivative2V" class="link">Source</a> <a href="#v:evaluateDerivative2V" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a></td><td class="doc"><p>What method to use to interpolate</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Data points <code>xs</code> sampling the domain of the function</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Data points <code>ys</code> sampling the range of the function</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Point <code>x</code> at which to evaluate the second derivative</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Interpolated result</p></td></tr></table></div><div class="doc"><p>Evaluate the second derivative of a function by interpolating within the
given dataset. For example:</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>let xs = vector [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>let ys = vector $ map (**2) [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>evaluateDerivative2V CSpline xs ys 2.2
</code></strong>2.4
</pre><p>To successfully <code>evaluateDerivative2V xs ys x</code>, the vectors <code>xs</code> and
<code>ys</code> must have identical lengths, and <code>xs</code> must be monotonically
increasing. The evaluation point <code>x</code> must lie between the smallest
and largest values in <code>xs</code>.</p></div></div><h1 id="g:4">Evaluation of integrals of interpolated functions</h1><div class="top"><p class="src"><a id="v:evaluateIntegral" class="def">evaluateIntegral</a> <a href="src/Numeric-GSL-Interpolation.html#evaluateIntegral" class="link">Source</a> <a href="#v:evaluateIntegral" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a></td><td class="doc"><p>What method to use to interpolate</p></td></tr><tr><td class="src">-> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>)]</td><td class="doc"><p>(domain, range) points sampling the function</p></td></tr><tr><td class="src">-> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>)</td><td class="doc"><p>Integration bounds (<code>a</code>, <code>b</code>)</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Resulting area</p></td></tr></table></div><div class="doc"><p>Evaluate the definite integral of a function by interpolating
within the given dataset. For example:</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>let xs = [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>let ys = map (**2) [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>evaluateIntegralV CSpline (zip xs ys) (2.2, 5.5)
</code></strong>51.909
</pre><p>To successfully <code>evaluateIntegral points (a, b)</code>, the domain (<code>x</code>)
values of <code>points</code> must be monotonically increasing. The integration
bounds <code>a</code> and <code>b</code> must lie between the smallest and largest values in
the sampled domain..</p></div></div><div class="top"><p class="src"><a id="v:evaluateIntegralV" class="def">evaluateIntegralV</a> <a href="src/Numeric-GSL-Interpolation.html#evaluateIntegralV" class="link">Source</a> <a href="#v:evaluateIntegralV" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Numeric-GSL-Interpolation.html#t:InterpolationMethod">InterpolationMethod</a></td><td class="doc"><p>What method to use to interpolate</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Data points <code>xs</code> sampling the domain of the function</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/libghc-hmatrix-doc/html/Numeric-LinearAlgebra-Data.html#t:Vector">Vector</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Data points <code>ys</code> sampling the range of the function</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Lower integration bound <code>a</code></p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Upper integration bound <code>b</code></p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>Resulting area</p></td></tr></table></div><div class="doc"><p>Evaluate the definite integral of a function by interpolating
within the given dataset. For example:</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>let xs = vector [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>let ys = vector $ map (**2) [1..10]
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>evaluateIntegralV CSpline xs ys 2.2 5.5
</code></strong>51.89853207547169
</pre><p>To successfully <code>evaluateIntegralV xs ys a b</code>, the vectors <code>xs</code> and
<code>ys</code> must have identical lengths, and <code>xs</code> must be monotonically
increasing. The integration bounds <code>a</code> and <code>b</code> must lie between the
smallest and largest values in <code>xs</code>.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
|