⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 brinv.cs

📁 将一些标准数值与非数值算法集中封装在几个DLL中,需要用时可在VB/Delphi/C#中分别调用,这里提供了3个小程序,分别用于线性方程组求根、计算行列式的值、矩阵求逆。
💻 CS
字号:
using System;
using System.Runtime.InteropServices;
public class RefComm//_brinv@8 
  { 
  [DllImport("MATHLIB52.DLL", 
      EntryPoint="_brinv@8", 
      CharSet=CharSet.Auto,
          CallingConvention=CallingConvention.StdCall)]
          public static extern int brinv(double[] a,int n);
      //public static extern int brinv(ref double a,int n); 
public static void Main()
{double [] a=new double[9];
Console.WriteLine("输入3*3矩阵中的9个数:");
for(int i=0;i<a.Length;i++)
a[i]= Convert.ToDouble(Console.ReadLine());
int ret=brinv(a,3);
if(ret!=0){
foreach(double j in a)
Console.WriteLine(j.ToString()+"\t");
}
}
} 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -