C # math libraries that work on simple vectors and arrays

There are several math libraries for C #, but they all seem to either define their own vector and matrix types, or work with established C # classes such as Vector3D or Vector.

Are there mathematical libraries that work with "simple" vector and matrix types, such as double [] and double [,]

Some example of nice to have functions would be

double[] v = new double[3]; double[] w = new double[3]; double m[,] = new double[3,3]; double vDOTv = DesiredClass.Dot(v); // vv double[] normV = DesiredClass.Normalize(v); // normalize vector double[] cCROSSw = DesiredClass.Cross(v,w); // vxw double vDOTm = DesiredClass.Dot(v,m,i); // vm[i] - dot product of v with ith row of m 
+4
source share
2 answers

Math.Net Numerics provides various matrix methods, including MatrixMultiply and MatrixNorm, which work on double[] , so it looks like most of what you need. I could not see the point product, but it may be under a different name, which I do not know about.

+1
source

You can create your own classes for these types and provide them with implicit conversion from and to double arrays, and then create these utility methods that take parameters of your own type that will work on these arrays, since there is an implicit conversion.

But that would be a little suspicious, why not work with regular types already.

+1
source

All Articles