using System; using System.Runtime.InteropServices;/* Provides mappings between C# and native code */ namespace NumericalAlgorithmsGroup { class LUSolve { [DllImport("FLDLL214Z_nag.dll")]/* Import from DLL, the C# compiler provides a rudimentry check of the signature */ public static extern void F04AJF(ref int n, ref int ir, double [,] a, ref int ia, double [] p, double [,] b, ref int ib); [DllImport("FLDLL214Z_nag.dll")] public static extern void F03AFF(ref int n, ref double eps, double [,] a, ref int ia, ref double d1, ref int id, double [] p, ref int ifail); public static void Main() { double [,] a = { {33, 16, 72}, {-24, -10, -57}, {-8, -4, -17} }; double [,] b = {{-359, -359},{ 281, 281}, {85,85}}; int n = a.GetLength(0); int ir = b.GetLength(1); double eps = 1.0e-16; double d1=0.0; int id=0; double [] p = new double [n]; int ifail=1; double [,] at = new double [n,n]; for (int i=0; i