<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ARB Security Solutions - SharePoint Security Solutions &#187; Numerical Analysis</title>
	<atom:link href="http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sharepointsecurity.com</link>
	<description>The Authorative Resource For SharePoint Security Articles, Research, Software, And Security Consulting</description>
	<lastBuildDate>Wed, 05 Jun 2013 17:30:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Calculating Polynomial Interpolation Coefficients</title>
		<link>http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-polynomial-interpolation-coefficients/</link>
		<comments>http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-polynomial-interpolation-coefficients/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 16:27:14 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Numerical Analysis]]></category>
		<category><![CDATA[double array]]></category>
		<category><![CDATA[interpolation]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[Polynomial]]></category>
		<category><![CDATA[tabulation]]></category>

		<guid isPermaLink="false">http://www.sharepointsecurity.com/?p=1530</guid>
		<description><![CDATA[<p>The interpolation of a dataset can be examined by polynomials, which is nice because polynomials are useful for complex curves approximations. In order to get the coefficients of the polynomial, since the dataset points are known, the below InterpolatingPolynomialCoefficients method can be used. This takes in a double array of tabulation points and polynomial points. [...]</p><p>The post <a href="http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-polynomial-interpolation-coefficients/">Calculating Polynomial Interpolation Coefficients</a> appeared first on <a href="http://www.sharepointsecurity.com">ARB Security Solutions - SharePoint Security Solutions</a>.</p><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-the-second-derivatives-of-a-piecewise-cubic-polynomial/' rel='bookmark' title='Calculating The Second Derivatives Of A Piecewise Cubic Polynomial'>Calculating The Second Derivatives Of A Piecewise Cubic Polynomial</a></li>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/interpolating-data-points-on-a-two-dimensional-regular-grid/' rel='bookmark' title='Interpolating Data Points On A Two Dimensional Regular Grid'>Interpolating Data Points On A Two Dimensional Regular Grid</a></li>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/pex-and-mole/pex-and-dynamic-test-methods/' rel='bookmark' title='Pex And Dynamic Test Methods'>Pex And Dynamic Test Methods</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>The interpolation of a dataset can be examined by polynomials, which is nice because polynomials are useful for complex curves approximations. In order to get the coefficients of the polynomial, since the dataset points are known, the below InterpolatingPolynomialCoefficients method can be used. This takes in a double array of tabulation points and polynomial points.</p>
<div id="ig-sh-1" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">C++</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="cpp" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;">public</span><span style="color: #008080;">:</span> <span style="color: #0000ff;">virtual</span> Double __gc<span style="color: #000040;">*</span> InterpolatingPolynomialCoefficients<span style="color: #008000;">&#40;</span>Double __gc<span style="color: #000040;">*</span> tabPoints __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span>, Double __gc<span style="color: #000040;">*</span> polyPoints __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Int32 __gc<span style="color: #000040;">*</span> length <span style="color: #000080;">=</span> Math<span style="color: #008080;">::</span><span style="color: #007788;">Min</span><span style="color: #008000;">&#40;</span>tabPoints<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>Length, polyPoints<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>Length<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> tempArray __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> __gc <span style="color: #0000dd;">new</span> Double __gc<span style="color: #000040;">*</span><span style="color: #008000;">&#91;</span>length<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> returnArray __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> __gc <span style="color: #0000dd;">new</span> Double __gc<span style="color: #000040;">*</span><span style="color: #008000;">&#91;</span>length<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">try</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span>Int32 __gc<span style="color: #000040;">*</span> i <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> <span style="color: #008000;">&#40;</span>i <span style="color: #000080;">&lt;</span> length<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tempArray<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> returnArray<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; tempArray<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>length <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #000040;">-</span>tabPoints<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; PushToTempArray<span style="color: #008000;">&#40;</span>tabPoints, length, tempArray<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; PushToFinalArray<span style="color: #008000;">&#40;</span>tabPoints, polyPoints, length, tempArray, returnArray<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">catch</span> <span style="color: #008000;">&#40;</span>ArithmeticException __gc<span style="color: #000040;">*</span> exception<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">return</span> returnArray<span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;<span style="color: #0000ff;">private</span><span style="color: #008080;">:</span> <span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> __gc<span style="color: #000040;">*</span> PushToFinalArray<span style="color: #008000;">&#40;</span>Double __gc<span style="color: #000040;">*</span> tabPoints __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span>, Double __gc<span style="color: #000040;">*</span> polyPoints __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span>, Int32 __gc<span style="color: #000040;">*</span> length, Double __gc<span style="color: #000040;">*</span> tempArray __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span>, Double __gc<span style="color: #000040;">*</span> returnArray __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span>Int32 __gc<span style="color: #000040;">*</span> calcHold <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> <span style="color: #008000;">&#40;</span>calcHold <span style="color: #000080;">&lt;</span> length<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> calcHold<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> lengthHold <span style="color: #000080;">=</span> length<span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Int32 __gc<span style="color: #000040;">*</span> index <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>length <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">while</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>index <span style="color: #000080;">&gt;=</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lengthHold <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>index <span style="color: #000040;">*</span> tempArray<span style="color: #008000;">&#91;</span>index<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> <span style="color: #008000;">&#40;</span>tabPoints<span style="color: #008000;">&#91;</span>calcHold<span style="color: #008000;">&#93;</span> <span style="color: #000040;">*</span> lengthHold<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; index<span style="color: #000040;">--</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> poolArrayAndHold <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>polyPoints<span style="color: #008000;">&#91;</span>calcHold<span style="color: #008000;">&#93;</span> <span style="color: #000040;">/</span> lengthHold<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> iArray <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span>index <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>length <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #008000;">&#40;</span>index <span style="color: #000080;">&gt;=</span> <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> index<span style="color: #000040;">--</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; returnArray<span style="color: #008000;">&#91;</span>index<span style="color: #008000;">&#93;</span> <span style="color: #000040;">+</span><span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>iArray <span style="color: #000040;">*</span> poolArrayAndHold<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; iArray <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>tempArray<span style="color: #008000;">&#91;</span>index<span style="color: #008000;">&#93;</span> <span style="color: #000040;">+</span> <span style="color: #008000;">&#40;</span>tabPoints<span style="color: #008000;">&#91;</span>calcHold<span style="color: #008000;">&#93;</span> <span style="color: #000040;">*</span> iArray<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;">private</span><span style="color: #008080;">:</span> <span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> __gc<span style="color: #000040;">*</span> PushToTempArray<span style="color: #008000;">&#40;</span>Double __gc<span style="color: #000040;">*</span> tabPoints __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span>, Int32 __gc<span style="color: #000040;">*</span> length, Double __gc<span style="color: #000040;">*</span> tempArray __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span>Int32 __gc<span style="color: #000040;">*</span> i <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">;</span> <span style="color: #008000;">&#40;</span>i <span style="color: #000080;">&lt;</span> length<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; IntPtr __gc<span style="color: #000040;">*</span> x<span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span>Int32 __gc<span style="color: #000040;">*</span> calcHold <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>length <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">-</span> i<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #008000;">&#40;</span>calcHold <span style="color: #000080;">&lt;</span> <span style="color: #008000;">&#40;</span>length <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> calcHold<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tempArray<span style="color: #008000;">&#91;</span>calcHold<span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span><span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>tabPoints<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span> <span style="color: #000040;">*</span> tempArray<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>calcHold <span style="color: #000040;">+</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; tempArray<span style="color: #008000;">&#91;</span><span style="color: #000040;">*</span><span style="color: #0000ff;">static_cast</span><span style="color: #000080;">&lt;</span>__box Int32<span style="color: #000040;">*</span><span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span>x <span style="color: #000080;">=</span> <span style="color: #000040;">*</span><span style="color: #0000ff;">static_cast</span><span style="color: #000080;">&lt;</span>__box IntPtr<span style="color: #000040;">*</span><span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>length <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>tempArray<span style="color: #008000;">&#91;</span><span style="color: #000040;">*</span><span style="color: #0000ff;">static_cast</span><span style="color: #000080;">&lt;</span>__box Int32<span style="color: #000040;">*</span><span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span>x<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> tabPoints<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
</ol>	</div></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.sharepointsecurity.com%2Fsharepoint%2Fsharepoint-development%2Fnumerical-analysis%2Fcalculating-polynomial-interpolation-coefficients%2F&amp;title=Calculating%20Polynomial%20Interpolation%20Coefficients" id="wpa2a_2"><img src="http://www.sharepointsecurity.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Calculating Polynomial Interpolation Coefficients"  title="Calculating Polynomial Interpolation Coefficients" /></a></p><p>The post <a href="http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-polynomial-interpolation-coefficients/">Calculating Polynomial Interpolation Coefficients</a> appeared first on <a href="http://www.sharepointsecurity.com">ARB Security Solutions - SharePoint Security Solutions</a>.</p><div class='yarpp-related-rss'>
<p>Related posts:</p><ol>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-the-second-derivatives-of-a-piecewise-cubic-polynomial/' rel='bookmark' title='Calculating The Second Derivatives Of A Piecewise Cubic Polynomial'>Calculating The Second Derivatives Of A Piecewise Cubic Polynomial</a></li>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/interpolating-data-points-on-a-two-dimensional-regular-grid/' rel='bookmark' title='Interpolating Data Points On A Two Dimensional Regular Grid'>Interpolating Data Points On A Two Dimensional Regular Grid</a></li>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/pex-and-mole/pex-and-dynamic-test-methods/' rel='bookmark' title='Pex And Dynamic Test Methods'>Pex And Dynamic Test Methods</a></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-polynomial-interpolation-coefficients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interpolating Data Points On A Two Dimensional Regular Grid</title>
		<link>http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/interpolating-data-points-on-a-two-dimensional-regular-grid/</link>
		<comments>http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/interpolating-data-points-on-a-two-dimensional-regular-grid/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 14:36:21 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Numerical Analysis]]></category>
		<category><![CDATA[exception]]></category>
		<category><![CDATA[interpolation]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[public]]></category>
		<category><![CDATA[target]]></category>
		<category><![CDATA[virtual]]></category>

		<guid isPermaLink="false">http://www.sharepointsecurity.com/?p=1517</guid>
		<description><![CDATA[<p>This was a pain in the ass to figure out. So this method is for basic Bicubic interpolation, a principal based on cubic interpolation, targeted to be called to work with values and derivatives on that plain at any given point. The title of the post kind of says it all. C++ &#60; view plain [...]</p><p>The post <a href="http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/interpolating-data-points-on-a-two-dimensional-regular-grid/">Interpolating Data Points On A Two Dimensional Regular Grid</a> appeared first on <a href="http://www.sharepointsecurity.com">ARB Security Solutions - SharePoint Security Solutions</a>.</p><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-the-second-derivatives-of-a-piecewise-cubic-polynomial/' rel='bookmark' title='Calculating The Second Derivatives Of A Piecewise Cubic Polynomial'>Calculating The Second Derivatives Of A Piecewise Cubic Polynomial</a></li>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-polynomial-interpolation-coefficients/' rel='bookmark' title='Calculating Polynomial Interpolation Coefficients'>Calculating Polynomial Interpolation Coefficients</a></li>
<li><a href='http://www.sharepointsecurity.com/uncategorized/found-block-that-points-outside-data-file-at/' rel='bookmark' title='Found Block That Points Outside Data File At &lt;BLAH&gt;'>Found Block That Points Outside Data File At <BLAH></a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>This was a pain in the ass to figure out. So this method is for basic Bicubic interpolation, a principal based on cubic interpolation, targeted to be called to work with values and derivatives on that plain at any given point. The title of the post kind of says it all.</p>
<div id="ig-sh-2" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">C++</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="cpp" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;">public</span><span style="color: #008080;">:</span> <span style="color: #0000ff;">virtual</span> Double __gc<span style="color: #000040;">*</span> CalcBiCubicInterpolation<span style="color: #008000;">&#40;</span>Double __gc<span style="color: #000040;">*</span> __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> coeff __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span>, Double __gc<span style="color: #000040;">*</span> dir1Down, Double __gc<span style="color: #000040;">*</span> dir1Up, Double __gc<span style="color: #000040;">*</span> dir2Down, Double __gc<span style="color: #000040;">*</span> dir2Up, Double __gc<span style="color: #000040;">*</span> dir1, Double __gc<span style="color: #000040;">*</span> dir2<span style="color: #008000;">&#41;</span> __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> numArray __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> __gc <span style="color: #0000dd;">new</span> Double __gc<span style="color: #000040;">*</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">try</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> HD1 <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> HD2 <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> HD3 <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> evalDir1 <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>dir1Up <span style="color: #000040;">-</span> dir1Down<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> evalDir2 <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>dir2Up <span style="color: #000040;">-</span> dir2Down<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> finDirCalc1 <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>dir2Up <span style="color: #000040;">-</span> dir1Down<span style="color: #008000;">&#41;</span> <span style="color: #000040;">/</span> evalDir1<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> finDirCalc2 <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>dir2 <span style="color: #000040;">-</span> dir2Down<span style="color: #008000;">&#41;</span> <span style="color: #000040;">/</span> evalDir2<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; HD1 <span style="color: #000080;">=</span> Process<span style="color: #008000;">&#40;</span>finDirCalc1, HD1, coeff, finDirCalc2, ref HD3, ref HD2<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; HD2 <span style="color: #000040;">/</span><span style="color: #000080;">=</span> evalDir1<span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; HD3 <span style="color: #000040;">/</span><span style="color: #000080;">=</span> evalDir2<span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; numArray <span style="color: #000080;">=</span> __gc <span style="color: #0000dd;">new</span> Double __gc<span style="color: #000040;">*</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span> <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HD1, HD2, HD3<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">catch</span> <span style="color: #008000;">&#40;</span>ArithmeticException __gc<span style="color: #000040;">*</span> exception<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">return</span> numArray<span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;">private</span><span style="color: #008080;">:</span> <span style="color: #0000ff;">static</span> Double __gc<span style="color: #000040;">*</span> Process<span style="color: #008000;">&#40;</span>Double __gc<span style="color: #000040;">*</span> finDirCalc1, Double __gc<span style="color: #000040;">*</span> HD1, Double __gc<span style="color: #000040;">*</span> __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> coeff __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span>, Double __gc<span style="color: #000040;">*</span> finDirCalc2, Double __gc<span style="color: #000040;">*</span><span style="color: #000040;">&amp;</span> HD3, Double __gc<span style="color: #000040;">*</span><span style="color: #000040;">&amp;</span> HD2<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span>Int32 __gc<span style="color: #000040;">*</span> i <span style="color: #000080;">=</span> <span style="color: #0000dd;">3</span><span style="color: #008080;">;</span> <span style="color: #008000;">&#40;</span>i <span style="color: #000080;">&gt;=</span> <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> i<span style="color: #000040;">--</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; HD1 <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>finDirCalc1 <span style="color: #000040;">*</span> HD1<span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>coeff<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">*</span> finDirCalc2<span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> coeff<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> finDirCalc2<span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> coeff<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> finDirCalc2<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> coeff<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; HD3 <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>finDirCalc1 <span style="color: #000040;">*</span> HD3<span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">3</span> <span style="color: #000040;">*</span> coeff<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> finDirCalc2<span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> <span style="color: #008000;">&#40;</span><span style="color: #0000dd;">2</span> <span style="color: #000040;">*</span> coeff<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> finDirCalc2<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> coeff<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; HD2 <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>finDirCalc2 <span style="color: #000040;">*</span> HD2<span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">3</span> <span style="color: #000040;">*</span> coeff<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> finDirCalc1<span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> <span style="color: #008000;">&#40;</span><span style="color: #0000dd;">2</span> <span style="color: #000040;">*</span> coeff<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> finDirCalc1<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> coeff<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">return</span> HD1<span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
</ol>	</div></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.sharepointsecurity.com%2Fsharepoint%2Fsharepoint-development%2Fnumerical-analysis%2Finterpolating-data-points-on-a-two-dimensional-regular-grid%2F&amp;title=Interpolating%20Data%20Points%20On%20A%20Two%20Dimensional%20Regular%20Grid" id="wpa2a_4"><img src="http://www.sharepointsecurity.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Interpolating Data Points On A Two Dimensional Regular Grid"  title="Interpolating Data Points On A Two Dimensional Regular Grid" /></a></p><p>The post <a href="http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/interpolating-data-points-on-a-two-dimensional-regular-grid/">Interpolating Data Points On A Two Dimensional Regular Grid</a> appeared first on <a href="http://www.sharepointsecurity.com">ARB Security Solutions - SharePoint Security Solutions</a>.</p><div class='yarpp-related-rss'>
<p>Related posts:</p><ol>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-the-second-derivatives-of-a-piecewise-cubic-polynomial/' rel='bookmark' title='Calculating The Second Derivatives Of A Piecewise Cubic Polynomial'>Calculating The Second Derivatives Of A Piecewise Cubic Polynomial</a></li>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-polynomial-interpolation-coefficients/' rel='bookmark' title='Calculating Polynomial Interpolation Coefficients'>Calculating Polynomial Interpolation Coefficients</a></li>
<li><a href='http://www.sharepointsecurity.com/uncategorized/found-block-that-points-outside-data-file-at/' rel='bookmark' title='Found Block That Points Outside Data File At &lt;BLAH&gt;'>Found Block That Points Outside Data File At <BLAH></a></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/interpolating-data-points-on-a-two-dimensional-regular-grid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculating The Second Derivatives Of A Piecewise Cubic Polynomial</title>
		<link>http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-the-second-derivatives-of-a-piecewise-cubic-polynomial/</link>
		<comments>http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-the-second-derivatives-of-a-piecewise-cubic-polynomial/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 23:03:32 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Numerical Analysis]]></category>
		<category><![CDATA[double]]></category>
		<category><![CDATA[double array]]></category>
		<category><![CDATA[interpolation]]></category>
		<category><![CDATA[Optimize SharePoint]]></category>
		<category><![CDATA[Polynomial]]></category>
		<category><![CDATA[tabulation]]></category>

		<guid isPermaLink="false">http://www.sharepointsecurity.com/?p=1512</guid>
		<description><![CDATA[<p>The purpose of this method is to provide the faculty to calculate the second derivatives of a piecewise cubic polynomial with continuous first and second derivatives when there are known tabulation points. For more information on Spline interpolation you can view this article here. Naturally, this returns an typed double array containing the second derivatives [...]</p><p>The post <a href="http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-the-second-derivatives-of-a-piecewise-cubic-polynomial/">Calculating The Second Derivatives Of A Piecewise Cubic Polynomial</a> appeared first on <a href="http://www.sharepointsecurity.com">ARB Security Solutions - SharePoint Security Solutions</a>.</p><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-polynomial-interpolation-coefficients/' rel='bookmark' title='Calculating Polynomial Interpolation Coefficients'>Calculating Polynomial Interpolation Coefficients</a></li>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/interpolating-data-points-on-a-two-dimensional-regular-grid/' rel='bookmark' title='Interpolating Data Points On A Two Dimensional Regular Grid'>Interpolating Data Points On A Two Dimensional Regular Grid</a></li>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/what-the-hell-is-nan/' rel='bookmark' title='What the hell is NaN?'>What the hell is NaN?</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>The purpose of this method is to provide the faculty to calculate the second derivatives of a piecewise cubic polynomial with continuous first and second derivatives when there are known tabulation points. For more information on Spline interpolation you can view this article <a href="http://en.wikipedia.org/wiki/Spline_interpolation">here</a>. Naturally, this returns an typed double array containing the second derivatives of the interpolation function at the tabulation points. There are going to be four parameters used, a double array specifying the tabulation points, one for values of the function evaluated at the interpolation points, and the two to handle the derivative of the interpolation function consumption. There is currently a limit in this calculation with the provided arrays, but meh.</p>
<div id="ig-sh-3" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">C++</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="cpp" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;">public</span><span style="color: #008080;">:</span> <span style="color: #0000ff;">virtual</span> Double __gc<span style="color: #000040;">*</span> cubicSpline2ndDifferential<span style="color: #008000;">&#40;</span>Double __gc<span style="color: #000040;">*</span> tabPoints __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span>, Double __gc<span style="color: #000040;">*</span> funcVals __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span>, Double __gc<span style="color: #000040;">*</span> dervAt0X, Double __gc<span style="color: #000040;">*</span> dervAtN<span style="color: #008000;">&#41;</span> __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> place<span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> holder<span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Int32 __gc<span style="color: #000040;">*</span> num <span style="color: #000080;">=</span> Math<span style="color: #008080;">::</span><span style="color: #007788;">Min</span><span style="color: #008000;">&#40;</span>tabPoints<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>Length, funcVals<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>Length<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> helpArray __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> __gc <span style="color: #0000dd;">new</span> Double __gc<span style="color: #000040;">*</span><span style="color: #008000;">&#91;</span>num<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> returnArray __gc <span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> __gc <span style="color: #0000dd;">new</span> Double __gc<span style="color: #000040;">*</span><span style="color: #008000;">&#91;</span>num<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>dervAt0X <span style="color: #000080;">&gt;</span> <span style="color:#800080;">9.9E+29</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; returnArray<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> helpArray<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">else</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; returnArray<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #000040;">-</span><span style="color:#800080;">0.5</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; helpArray<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">3</span> <span style="color: #000040;">/</span> <span style="color: #008000;">&#40;</span>tabPoints<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> tabPoints<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>funcVals<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> funcVals<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">/</span> <span style="color: #008000;">&#40;</span>tabPoints<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> tabPoints<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">-</span> dervAt0X<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span>Int32 __gc<span style="color: #000040;">*</span> i <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">;</span> <span style="color: #008000;">&#40;</span>i <span style="color: #000080;">&lt;</span> <span style="color: #008000;">&#40;</span>num <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> calcedTab <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>tabPoints<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> tabPoints<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>i <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">/</span> <span style="color: #008000;">&#40;</span>tabPoints<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>i <span style="color: #000040;">+</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> tabPoints<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>i <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Double __gc<span style="color: #000040;">*</span> calcedArray <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>calcedTab <span style="color: #000040;">*</span> returnArray<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>i <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> <span style="color: #0000dd;">2</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; returnArray<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>calcedTab <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">/</span> calcedArray<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; helpArray<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>funcVals<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>i <span style="color: #000040;">+</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> funcVals<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">/</span> <span style="color: #008000;">&#40;</span>tabPoints<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>i <span style="color: #000040;">+</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> tabPoints<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">-</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>funcVals<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> funcVals<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>i <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">/</span> <span style="color: #008000;">&#40;</span>tabPoints<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> tabPoints<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>i <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; helpArray<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">6</span> <span style="color: #000040;">*</span> helpArray<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">/</span> <span style="color: #008000;">&#40;</span>tabPoints<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>i <span style="color: #000040;">+</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> tabPoints<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>i <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">-</span> <span style="color: #008000;">&#40;</span>calcedTab <span style="color: #000040;">*</span> helpArray<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>i <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">/</span> calcedArray<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>dervAtN <span style="color: #000080;">&gt;</span> <span style="color:#800080;">9.9E+29</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; place <span style="color: #000080;">=</span> holder <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">else</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; place <span style="color: #000080;">=</span> <span style="color:#800080;">0.5</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; holder <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">3</span> <span style="color: #000040;">/</span> <span style="color: #008000;">&#40;</span>tabPoints<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>num <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> tabPoints<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>num <span style="color: #000040;">-</span> <span style="color: #0000dd;">2</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">*</span> <span style="color: #008000;">&#40;</span>dervAtN <span style="color: #000040;">-</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>funcVals<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>num <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> funcVals<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>num <span style="color: #000040;">-</span> <span style="color: #0000dd;">2</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">/</span> <span style="color: #008000;">&#40;</span>tabPoints<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>num <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span> <span style="color: #000040;">-</span> tabPoints<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>num <span style="color: #000040;">-</span> <span style="color: #0000dd;">2</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; returnArray<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>num <span style="color: #000040;">-</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>holder <span style="color: #000040;">-</span> <span style="color: #008000;">&#40;</span>place <span style="color: #000040;">*</span> helpArray<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>num <span style="color: #000040;">-</span> <span style="color: #0000dd;">2</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">/</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>place <span style="color: #000040;">*</span> returnArray<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>num <span style="color: #000040;">-</span> <span style="color: #0000dd;">2</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span>Int32 __gc<span style="color: #000040;">*</span> j <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>num <span style="color: #000040;">-</span> <span style="color: #0000dd;">2</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #008000;">&#40;</span>j <span style="color: #000080;">&gt;=</span> <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> j<span style="color: #000040;">--</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; returnArray<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>returnArray<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span> <span style="color: #000040;">*</span> returnArray<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#40;</span>j <span style="color: #000040;">+</span> <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> helpArray<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">return</span> returnArray<span style="color: #008080;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
</ol>	</div></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.sharepointsecurity.com%2Fsharepoint%2Fsharepoint-development%2Fnumerical-analysis%2Fcalculating-the-second-derivatives-of-a-piecewise-cubic-polynomial%2F&amp;title=Calculating%20The%20Second%20Derivatives%20Of%20A%20Piecewise%20Cubic%20Polynomial" id="wpa2a_6"><img src="http://www.sharepointsecurity.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Calculating The Second Derivatives Of A Piecewise Cubic Polynomial"  title="Calculating The Second Derivatives Of A Piecewise Cubic Polynomial" /></a></p><p>The post <a href="http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-the-second-derivatives-of-a-piecewise-cubic-polynomial/">Calculating The Second Derivatives Of A Piecewise Cubic Polynomial</a> appeared first on <a href="http://www.sharepointsecurity.com">ARB Security Solutions - SharePoint Security Solutions</a>.</p><div class='yarpp-related-rss'>
<p>Related posts:</p><ol>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-polynomial-interpolation-coefficients/' rel='bookmark' title='Calculating Polynomial Interpolation Coefficients'>Calculating Polynomial Interpolation Coefficients</a></li>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/interpolating-data-points-on-a-two-dimensional-regular-grid/' rel='bookmark' title='Interpolating Data Points On A Two Dimensional Regular Grid'>Interpolating Data Points On A Two Dimensional Regular Grid</a></li>
<li><a href='http://www.sharepointsecurity.com/sharepoint/sharepoint-development/what-the-hell-is-nan/' rel='bookmark' title='What the hell is NaN?'>What the hell is NaN?</a></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sharepointsecurity.com/sharepoint/sharepoint-development/numerical-analysis/calculating-the-second-derivatives-of-a-piecewise-cubic-polynomial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
