I just downloaded the latest version of Math.NET and I'm running into some trouble when I use it.
Could it be that the library was meant to run on a .NET 4.0 project?
Update:
The compiled dlls are within a "Net40" folder, does that mean I cannot reference it in a 2.0 project?
Tried this code and I got an TypeLoadException
(VS2008, target framework 3.5)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using MathNet.Numerics.LinearAlgebra.Double;
namespace MathNetTest
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
double[,] A = new double[3, 3];
A[0, 0] = 1;
A[0, 1] = 0.2;
A[0, 2] = 1;
A[1, 0] = 1.5;
A[1, 1] = -1.2;
A[1, 2] = 1.1;
A[2, 0] = 0.45;
A[2, 1] = 2.1;
A[2, 2] = -0.76;
Matrix XA = new DenseMatrix(A);
Matrix XB = new DenseMatrix(A);
Matrix C = (Matrix)(XA * XB);
}
}
}