Release: Math.NET Numerics 4.0

(Christoph Rüegg) #1

Math .NET Numerics v4.0 was released on 2018-02-11. Have a look at the Release Notes for a listing of all changes.

Breaking Changes

This is a major release. After more than three years without any breaking changes, it finally became time to clean up a few small things and to drop support of old platforms that kept us back from finally leveraging some newer features.

Platform Support

Starting from version 4.0, Numerics no longer supports .Net Framework 3.5, nor directly targets any PCL profiles. Instead, it now targets .Net Standard and .Net Framework only. The NuGet package contains the following builds:

  • .Net Framework 4.0
  • .Net Standard 2.0
  • .Net Standard 1.3 (without native provider support)

For those that still target .Net Framework 3.5, we continue to back-port bug fixes on the v3 branch for a while (on demand).

The F# extensions support less older platforms due to FSharp.Core. Hence, the F# NuGet package contains the following builds:

  • .Net Framework 4.5
  • .Net Standard 2.0
  • .Net Standard 1.6 (without native provider support)

Obsolete Functionality

All functionality that has been marked with Obsolete-attributes has been finally removed. There are hints on equivalent functionality to use instead within the attribute message text. If you missed the chance to update your code, you may want to downgrade back to v3 and resolve all build warnings related to obsolete APIs, before upgrading to v4.

Native Provider Control

In version 3.0, native providers were all controlled using the global Control class. Starting from version 4.0, this has been separated for each provider type:

  • LinearAlgebraControl
  • FourierTransformControl

For example, instead of Control.LinearAlgebraProvider you can now use LinearAlgebraControl.Provider.

Also, the provider implementation classes are no longer public. If you would like to create a provider instance explicitly, without also assigning them as active provider, you can still do that, using factory methods provided by the new control classes, e.g. LinearAlgebraControl.CreateNativeMKL().

Storage Provider Optional Arguments

This should not affect you, unless you use linear algebra storage providers directly. Quite a few routines on linear algebra structures can behave more efficiently if the algorithm gets some extra knowledge of the operation that is being performed. For example, if a function returns zero for zero, then we can skip a lot of values in large sparse matrices, resulting in much faster code. These options are usually optional with safe default values. In version 3.0 they were even optional directly on the storage providers. This has been changed in version 4.0, where they now must always be provided (rationale: prevent errors and force to think about it).

Statistics: Rank of single precision data

In version 3.0, ranks of single precision data has been returned in double precision. While we still return various descriptive statistics of single precision data in double precision, for ranks this does not make a lot of sense. Starting from version 4.0, ranks will be provided in same precision as the input data.

(Christoph Rüegg) #2