<title>Whittaker-Shannon interpolation</title>
<link rel="stylesheet" href="../math.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
-<link rel="home" href="../index.html" title="Math Toolkit 2.10.0">
-<link rel="up" href="../interpolation.html" title="Chapter 11. Interpolation">
-<link rel="prev" href="cardinal_quadratic_b.html" title="Cardinal Quadratic B-spline interpolation">
+<link rel="home" href="../index.html" title="Math Toolkit 2.11.0">
+<link rel="up" href="../interpolation.html" title="Chapter 12. Interpolation">
+<link rel="prev" href="cardinal_quintic_b.html" title="Cardinal Quintic B-spline interpolation">
<link rel="next" href="barycentric.html" title="Barycentric Rational Interpolation">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="cardinal_quadratic_b.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../interpolation.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="barycentric.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="cardinal_quintic_b.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../interpolation.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="barycentric.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
smooth, but has linear complexity in the data, making it slow relative to compactly-supported
b-splines. In addition, we cannot pass an infinite amount of data into the
class, and must truncate the (perhaps) infinite sinc series to a finite number
- of terms. Since the sinc function has slow 1/x decay, the truncation of the
- series can incur large error. Hence this interpolator works best when operating
- on samples of compactly supported functions. Here is an example of interpolating
- a smooth "bump function":
+ of terms. Since the sinc function has slow <span class="emphasis"><em>1/x</em></span> decay,
+ the truncation of the series can incur large error. Hence this interpolator
+ works best when operating on samples of compactly-supported functions. Here
+ is an example of interpolating a smooth "bump function":
</p>
<pre class="programlisting"><span class="keyword">auto</span> <span class="identifier">bump</span> <span class="special">=</span> <span class="special">[](</span><span class="keyword">double</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">if</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">abs</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span> <span class="special">>=</span> <span class="number">1</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="number">0.0</span><span class="special">;</span> <span class="special">}</span> <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">exp</span><span class="special">(-</span><span class="number">1.0</span><span class="special">/(</span><span class="number">1.0</span><span class="special">-</span><span class="identifier">x</span><span class="special">*</span><span class="identifier">x</span><span class="special">));</span> <span class="special">};</span>
<span class="identifier">v</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">bump</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
<span class="special">}</span>
-
<span class="keyword">auto</span> <span class="identifier">ws</span> <span class="special">=</span> <span class="identifier">whittaker_shannon</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">move</span><span class="special">(</span><span class="identifier">v</span><span class="special">),</span> <span class="identifier">t0</span><span class="special">,</span> <span class="identifier">h</span><span class="special">);</span>
<span class="keyword">double</span> <span class="identifier">y</span> <span class="special">=</span> <span class="identifier">ws</span><span class="special">(</span><span class="number">0.3</span><span class="special">);</span>
</h4>
<p>
The call to the constructor requires 𝑶(1) operations, simply moving data into
- the class. Each call the the interpolant is 𝑶(<span class="emphasis"><em>n</em></span>), where
+ the class. Each call to the interpolant is 𝑶(<span class="emphasis"><em>n</em></span>), where
<span class="emphasis"><em>n</em></span> is the number of points to interpolate.
</p>
</div>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="cardinal_quadratic_b.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../interpolation.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="barycentric.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="cardinal_quintic_b.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../interpolation.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="barycentric.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>