mathnet-numerics icon indicating copy to clipboard operation
mathnet-numerics copied to clipboard

Using params constructor for Vectors

Open connorokeefe opened this issue 4 years ago • 0 comments

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?

connorokeefe avatar Oct 21 '21 17:10 connorokeefe