Quantcast
Channel: Math.NET Numerics
Viewing all articles
Browse latest Browse all 971

New Post: new user question

$
0
0

Hi,

I am new to Math.NET Numerics and want to know the proper way to create vectors and matrices of both double and complex in the same file without prepending the namespace.  For example, is this the only way to create things?

Vector<double> a = new MathNet.Numerics.LinearAlgebra.Double.DenseVector(newdouble[] { 1, 2, 3 });
Vector<double> b = new MathNet.Numerics.LinearAlgebra.Double.DenseVector(newdouble[] { 4, 5, 6 });var c = a + b;var d = a * b;//Matrix<Complex> mat = new DenseMatrix(2, 3);

Matrix<Complex> mat = new MathNet.Numerics.LinearAlgebra.Complex.DenseMatrix(2, 3 );

Matrix<Complex> mat2 = new MathNet.Numerics.LinearAlgebra.Complex.DenseMatrix(1,3, new Complex[] { new Complex(1.0, 0.0), new Complex(2.0,0.0),new Complex(3.0, 0.0)});
Is there a way to just do the following:
Matrix<Complex> mat = new Matrix<Complex>(2,3);
Thanks

Viewing all articles
Browse latest Browse all 971

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>