Questions tagged [mathnet-numerics]

Math.NET Numerics is an opensource numerical library for .Net, Silverlight and Mono.

Math.NET Numerics is the numerical foundation of the Math.NET project, aiming to provide methods and algorithms for numerical computations in science, engineering and every day use. Covered topics include special functions, linear algebra, probability models, random numbers, statistics, interpolation, integration, curve fitting, integral transforms (FFT) and more.

In addition to the core .NET package (which is written entirely in C#), Numerics specifically supports F# 3.0 with idiomatic extension modules and maintains mathematical data structures like BigRational that originated in the F# PowerPack. If a performance boost is needed, the managed-code provider backing its linear algebra routines and decompositions can be exchanged with wrappers for optimized native implementations such as Intel MKL.

Supports Mono and .NET 4.0 on Linux, Mac and Windows, the portable version also Silverlight 5, WindowsPhone 8 and .NET for Windows Store apps.

Source: GitHub: Math.NET Numerics ReadMe file

230 questions
1
vote
2 answers

2D array - a nested array initializer is expected. C#

Im using MathNet.Numerics package for matrix calculation. For matrix declaration and initialization the expected code is as follows: Matrix A = DenseMatrix.OfArray(new double[,] { {1,1,1,1}, {1,2,3,4}, …
1
vote
1 answer

Math.Net Numerics library Transpose doesn't Work

So I want to transpose a matrix that I defined with using MathNet.Numerics.LinearAlgebra.Double; var MatrixValues = new double[]{1,1,2,2,3,3} var M = Matrix.Build; var C = M.Dense(3,2,MatrixValues); var TR =…
Afshinzkh
  • 111
  • 1
  • 14
1
vote
1 answer

Query length of a vector in MathNet.Numerics namespace

Is there any way to find the dimensions of a vector (or even matrix) for a Vector data structure in the MathNet.Numerics namespace. Something along the lines of int dimension = 3; Vector x = Vector.Build.Dense(dimension); int lengthOfX =…
Sood
  • 149
  • 1
  • 1
  • 11
1
vote
1 answer

Where is MathML in MathNet.Symbolics for c#?

Here it is for F#; Here it is in UnitTests. So it shall be at least in F# distribution thus in .net dll. And yet it does not show itself in Assembly Explorer How to use MathNet.Symbolics MathML classes in CSharp?
DuckQueen
  • 772
  • 10
  • 62
  • 134
1
vote
1 answer

MathNet Numerics needs FsUnit.CustomMatchers to successfully build. Ran out of options

In trying to build the latest version of MathNet Numerics from GitHub using Visual Studio Community 15 with MathNet.Numerics.sln which needs DLLs for unit testing installed. Could not resolve this reference. Could not locate the assembly…
Guy Coder
  • 24,501
  • 8
  • 71
  • 136
1
vote
1 answer

F#: For MathNet Numerics the value or constructor matrix is not defined

I'm trying to learn F#, and to create a matrix I follow the instructions from here: http://numerics.mathdotnet.com/ module Gew.M open MathNet.Numerics open MathNet.Numerics.LinearAlgebra let matrix1 = matrix [[1.0; 2.0]; [1.0; 3.0]] let matrix2…
Souf
  • 369
  • 2
  • 16
1
vote
1 answer

.Net Native Internal Compiler Error NUTC3028 when overriding mixed generic methods

I'm running into an internal compiler error NUTC3028 when trying to compile a trivial UWP app in release mode with a dependency on the MathNet.Numerics NuGet package (PCL Profile7). Related Github Issue. NUTC3028:Internal Compiler Error: Method …
Christoph Rüegg
  • 4,626
  • 1
  • 20
  • 34
1
vote
1 answer

Probleme with portable class and MathNET spatial

I try to install Math.NET Spatial in a portable class library in Visual Studio 2013 but I get an error. I get this following error in the NuGet Console : Install failed. Rolling back... Install-Package : Could not install package…
1
vote
2 answers

Speeding up Math.NET declaration for symmetric matrices

I'm building a reasonably huge matrix with this constructor: var M = Matrix.Build.Dense(N, N, (i, j) => SomeRoutine(i, j)); N is big and SomeRoutine is slow, so I'm trying to optimize things here and there. I noticed that for any i, j holds…
tonytonov
  • 25,060
  • 16
  • 82
  • 98
1
vote
2 answers

How can I convert an F# (double -> double) to Func?

I'm using MathNet.Numerics.LinearAlgebra to build a library. I need to apply a user-specified function to every element of the matrix, for which I know I can use Map: open System open MathNet.Numerics.LinearAlgebra open…
Shredderroy
  • 2,860
  • 2
  • 29
  • 53
1
vote
1 answer

Define a matrix in VB2012 with Math.net Numeric Matrix

I am switching from MATLAB to VS2012. I want to use Math.net Numeric to solve my matrix based equations. I am having hard time to define a simple matrix in VS2012 in VB environment using Math.Net matrix. I have found many articles on F# and how to…
alulak
  • 13
  • 4
1
vote
1 answer

Decreasing all values of a dictionary without loop. Or alternative storage possibility

I'm storing some data in a Math.net vector, as I have to do some calculations with it as a whole. This data comes with a time information when it was collected. So for example: Initial = 5, Time 2 = 7, Time 3 = 8, Time 4 = 10 So when I store the…
m8sch
  • 13
  • 3
1
vote
1 answer

Calculate some statistics with Math.Net

I have some results that are stored in a multidimensional array: double[,] results; Each column is a time series of prices for a specific variable (e.g. "house", "car", "electricity"). I would like to calculate some statistics for each variable so…
mickG
  • 335
  • 5
  • 13
1
vote
1 answer

Mathnet errors when trying to solve a multiple regression equation

I have the following code and I'm trying with 2 different methods to solve a multiple regression equation. The arrays are too long to list but the count on each one matches at 5704 lines. I'm getting the following errors when I try to run the…
DarthVegan
  • 1,719
  • 7
  • 25
  • 42
1
vote
1 answer

Proper F# type annotation for MathNet.Numerics.LinearAlgebra.vector

I have the following program: open System open MathNet.Numerics open MathNet.Numerics.LinearAlgebra //entropy let entropy v = let pct = v / v.Sum() let l1 = pct.Map (fun x -> System.Math.Log(x, 2.0)) let p = Vector.map2 (fun x y -> x *…
JonnyBoats
  • 5,177
  • 1
  • 36
  • 60