mathnet-numerics
mathnet-numerics copied to clipboard
Using params constructor for Vectors
Hi,
It would be nice to use params T[] in the constructor for Vector<T>, that way one could simply declare a vector as new Vector(1.1, 2.2, 3.3) instead of Vector<double>.Build.DenseOfArray(new double[] { 1.1, 2.2, 3.3 }).
A similar method could be used to build matrices: new Matrix(new double[2, 2] { x, x }, { x, x }) rather than Matrix.Build.DenseOfArray(new double[2, 2] { x, x }, { x, x }).
Is there a reason not to do this?