Wednesday, May 14, 2014

Open source project of the day: Meta.Numerics

Over the last four years I have contributed a fair amount of code to the open source community. Some of these projects I have initiated myself, other projects are forks of existing projects that I have adapted to Portable Class Libraries or new target platforms. The projects range from optimization and scientific computing, over medical imaging and image processing to utility libraries. In this mini-series I intend to give a short introduction to each of these open source projects.


Meta.Numerics is an open source library for advanced scientific computation in the .NET Framework, with a bias towards statistical computations. The main web site is located here, whereas the library source code is available on CodePlex. The library has less functionality than another open source library for scientific computation, Math.NET Numerics, but at the same time it also has a substantially smaller footprint and a simple-to-use API.

Today, I stumbled across a Meta.Numerics review and noticed that one potential user was disappointed that the library did not seem to be available for Windows Store/Metro/WinRT applications. 

However, Meta.Numerics is available for this platform target, and for Windows Phone, Silverlight, Xamarin.Android and Xamarin.iOS applications as well, which I have also reported to the previously disappointed developer. 

It so happens, that Meta.Numerics is one of the projects that I have adapted to a Portable Class Library! Originally, I ported the library to Silverlight only and these changes were eventually merged into the original source code. When PCL showed up it was however a simple task to continue the adaptation to the entire PCL range of targets.

Since the library primarily is concerned with mathematical computations, it was fairly simple to port it to a wide-ranging PCL library. The only functionality I have not been able to port is the binary serialization of a few classes, and some ADO.NET based methods for initializing statistical samples.

I have done my best to update the PCL library whenever new source code is committed to the original .NET library. The PCL version of Meta.Numerics is available on Github.

6 comments:

  1. Windows App will not accept Meta Numerics:
    Warning The assembly "C:\Inetpub_XP\...\bin\Debug\Portable.Meta.Numerics.dll" does not have a NeutralResourcesLanguageAttribute on it. To be used in an app package, portable libraries must define a NeutralResourcesLanguageAttribute on their main assembly (ie, the one containing code, not a satellite assembly).

    ReplyDelete
  2. Strange? What are you targeting, Windows 8.1 or? I will look into the issue when I have the time, alternatively you may fork the Github repository and investigate yourself.

    Many thanks for reporting!
    Anders

    ReplyDelete
    Replies
    1. Targeting Windows 10

      Delete
    2. Thanks for this. I would have thought it should work on Windows 10 as well, but apparently not. I will check a little further, and I guess you are too :-) I take it you forked the Github repository a while ago? If you reach any conclusions, I'd be more than happy to hear them.

      Best regards,
      Anders

      Delete
    3. I have tried it out on Windows 10 and a Universal App with VS 2015, and yes, I get the warning message. However, on the local machine I am allowed to build and run. It is an easy thing to add the attribute to the PCL library, so I will do that and publish an updated release soon.

      Regards,
      Anders

      Delete
  3. I have now released Portable Meta Numerics on NuGet, with [NeutralResourcesLanguage] attribute added so that it should be applicable to Windows 10 Universal applications as well. Package is listed here: https://www.nuget.org/packages/Portable.Meta.Numerics/

    Regards,
    Anders

    ReplyDelete