Math.NET Numerics Features Overview

You can suggest or vote for new features or ideas here.

Core

Namespace: MathNet.Numerics


Trigonometry Functions

Namespace: MathNet.Numerics
Class: MathNet.Numerics.Trig

Real and complex trigonometry functions


Number Theory

Namespace: MathNet.Numerics.NumberTheory
Class: MathNet.Numerics.NumberTheory.IntegerTheory


Numerically Stable Functions

Namespace: MathNet.Numerics
Class: MathNet.Numerics.SpecialFunctions


Special Functions

Namespace: MathNet.Numerics
Class: MathNet.Numerics.Fn






Combinatorics

Namespace: MathNet.Numerics
Class: MathNet.Numerics.Combinatorics


Probability Distributions

Namespace: MathNet.Numerics.Distributions

Continuous Probability Distributions

Continuous probability distributions support both the probability density function (pdf) and the cumulative distribution function (cdf), as well as the usual probability parameters. Additionally, random numbers can be generated based on the configured probability model parameters and some random number source.


Discrete Probability Distributions

Discrete probability distributions support both the probability mass function (pmf) and the cumulative distribution function (cdf), as well as the usual probability parameters. Additionally, random numbers can be generated based on the configured probability model parameters and some random number source.


Multivariate Probability Distributions


Random Sources

Namespace: MathNet.Numerics.Random

All implementations inherit the .Net framework provided System.Random class for interoperability.


Note that random sources should be reused, so be careful to create only one instance (per thread) and share it internally.

Interpolation

Namespace: MathNet.Numerics.Interpolation

Most interpolation algorithms also support numeric differentiation and integration. A facade class Interpolate is provided for easy access, but if needed the algorithms can also be used directly in the Algorithms sub-namespace. All implementations implement the interface IInterpolation.


If unsure what to choose, we recommend to simply use Interpolate.Common(x,y) which internally uses the barycentric rational pole-free interpolation.

Code Sample

double[] t = new double[] { -2.0, -1.0, 0.0, 1.0, 2.0 };
double[] x = new double[] { 1.0, 2.0, -1.0, 0.0, 1.0 };
IInterpolation interp = Interpolate.RationalWithoutPoles(t, x);
double a = interp.Interpolate(-0.5);

Linear Algebra

Namespace: MathNet.Numerics.LinearAlgebra


Integral Transforms

Namespace: MathNet.Numerics.IntegralTransforms


The transformation behavior can be configured (scaling, exponent sign, etc). See here for more details and code samples around Fourier transforms.