using System;
using System.Collections.Generic;
using System.Text;
using InterpolationLib;
namespace Sample4
{
class
Program
{
static
void Main(string[] args)
{
Console.WriteLine("InterpolationLib
Sample4");
Double[][]
input = new Double[2][];
input[0]
= new Double[]
{ 1, 0, 1 }; //first
row of matrix
input[1]
= new Double[]
{ 0, 2, 0 }; //second
row of matrix
Console.Write("\nInput:");
PrintMatrix(input);
//Perform
Interpolation
Double[][]
output = Interpolator.Do2(InterpolationType.Linear, ref input, 3, 6);
Console.WriteLine("\n[Linear
Interpolation]\n[Output Size 3x6]");
Console.Write("\nOutput:");
PrintMatrix(output);
Console.WriteLine();
}
static
void PrintMatrix(Double[][] mat)
{
Console.WriteLine();
for
(int i = 0; i < mat.Length; i++)
{
for (int j = 0; j < mat[i].Length; j++)
{
Console.Write(mat[i][j]);
if (j < mat[i].Length - 1) Console.Write("\t");
}
Console.Write("\n");
}
}
}
}