Ejemplo n.º 1
0
        public void Test10BilinearInterpolateTest()
        {
            double[,] dataArray = null;
            double columnTarget             = 0;
            double rowTarget                = 0;
            double expected                 = 0;
            SABRInterpolationInterface siif = SABRInterpolationInterface.Instance();
            double actual = siif.BilinearInterpolate(_bilinColumns,
                                                     _bilinRows, dataArray, columnTarget, rowTarget);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
        public void Test11BilinearInterpolateTest()
        {
            double[] columnTarget           = _bilinColumnTarget;
            double[] rowTarget              = _bilinRowTarget;
            double[] expected               = _bilinExpected;
            SABRInterpolationInterface siif = SABRInterpolationInterface.Instance();

            for (int i = 0; i < rowTarget.Length; i++)
            {
                double actual = siif.BilinearInterpolate(_bilinColumns,
                                                         _bilinRows, _bilinData,
                                                         columnTarget[i], rowTarget[i]);
                Assert.AreEqual(expected[i], Math.Round(actual, 4));
            }
        }