Extreme Optimization™: Complexity made simple.

Math and Statistics
Libraries for .NET

  • Home
  • Features
    • Math Library
    • Vector and Matrix Library
    • Statistics Library
    • Performance
    • Usability
  • Documentation
    • Introduction
    • Math Library User's Guide
    • Vector and Matrix Library User's Guide
    • Data Analysis Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Resources
    • Downloads
    • QuickStart Samples
    • Sample Applications
    • Frequently Asked Questions
    • Technical Support
  • Blog
  • Order
  • Company
    • About us
    • Testimonials
    • Customers
    • Press Releases
    • Careers
    • Partners
    • Contact us
Introduction
Deployment Guide
Nuget packages
Configuration
Using Parallelism
Expand Mathematics Library User's GuideMathematics Library User's Guide
Expand Vector and Matrix Library User's GuideVector and Matrix Library User's Guide
Expand Data Analysis Library User's GuideData Analysis Library User's Guide
Expand Statistics Library User's GuideStatistics Library User's Guide
Expand Data Access Library User's GuideData Access Library User's Guide
Expand ReferenceReference
  • Extreme Optimization
    • Features
    • Solutions
    • Documentation
    • QuickStart Samples
    • Sample Applications
    • Downloads
    • Technical Support
    • Download trial
    • How to buy
    • Blog
    • Company
    • Resources
  • Documentation
    • Introduction
    • Deployment Guide
    • Nuget packages
    • Configuration
    • Using Parallelism
    • Mathematics Library User's Guide
    • Vector and Matrix Library User's Guide
    • Data Analysis Library User's Guide
    • Statistics Library User's Guide
    • Data Access Library User's Guide
    • Reference
  • Configuration

Configuration

Extreme Optimization Numerical Libraries for .NET Professional

The Extreme Optimization Numerical Libraries for .NET has several configuration options. This section discusses the most important ones.

Selecting Implementations

There are several dimensions to how a particular calculation can be performed. Most fundamental is the numerical type that is used to represent real number. Most of the algorithms in the Extreme Optimization Numerical Libraries for .NET use double precision numbers. However, for specific calculations, like linear algebra and signal processing applications, other types may be used. For example, single-precision floating-point numbers or rational numbers.

When a calculation can be done with different types of operands, the implementing classes take a generic type argument that specifies the element types. For example, the VectorT type that represents vectors can have elements of arbitrary type. When a computational class doesn't take generic type arguments, it usually means that it only works with double-precision numbers.

The platform is another dimension. Is the code 100% managed? Or does it use optimized native code (based on Intel®'s Math Kernel Library)? Or does it use a CUDA-based GPU?

A provider is an object that provides implementations for one or more types that perform calculations. For example, there is a ManagedCoreProvider class that provides implementations for double-precision numbers for linear algebra (LinearAlgebraOperationsT) and FFT's (FftOperationsT).

When using double precision, no further action is needed. The managed provider is loaded automatically.

Using single-precision

To use single precision, two things need to be done:

First, a reference must be added to the Extreme.Numerics.SinglePrecision.Net40.dll assembly in your project. This assembly contains the managed implementations of single-precision calculations.

Second, the provider for single precision calculations must be registered. This can be done by calling the RegisterSinglePrecisionProvider(ProviderManager, Boolean) method on the Providers property of the NumericsConfiguration class. This ensures that, when calculations are to be done in single-precision, the correct implementation can be found.

Using other numerical types

Many calculations can also be done in arbitrary precision, or using Decimal or with rational numbers.

To use other types in calculations, a reference must be added to the Extreme.Numerics.Generic.Net40.dll assembly in your project. This assembly contains generic implementations of calculations.

Second, the provider for generic calculations must be registered. This can be done by calling the RegisterGenericProvider(ProviderManager) method on the Providers property of the NumericsConfiguration class. This method does not take a type argument: one provider supplies the implementation for all element types.

Using Implementations

The algorithms and objects in the Extreme Optimization Numerical Libraries for .NET automatically use the best available implementation. In the vast majority of cases, you won't need to use the implementation objects directly.

However, there may be times when this is necessary. For example, when performance is critical, some of the overhead inherent in encapsulating calculations in vector and matrix objects may be avoided by calling the linear algebra implementations directly. The CoreImplementationsT class defines the main implementations. It has the following properties:

Property

Description

LinearAlgebra

The core linear algebra operations, such as multiplying vectors and matrices, computing norms and dot products, solving triangular systems. The functionality is roughly equivalent to what is in the BLAS (Basic Linear Algebra Subroutines) library.

SparseLinearAlgebraOperations

Linear algebra operations that operate on sparse vectors and matrices.

Decompositions

Functions that compute matrix decompositions (LU, QR, SVD...) and use these decompositions for other calculations. The functionality is a subset of what is available in the LAPACK library.

VectorFunctions

Elementary functions that operate on the elements of vectors.

Fft

Fast Fourier Transforms and related functionality.

Although operations on real and complex vectors and matrices are very similar, there are some differences. Most importantly, some operations like norms produce real results even for complex arguments. Also, some operations like doing a rank update of a Hermitian matrix, require a value to be real. The way you call operations on real or complex vectors and matrices can sometimes be slightly different.

To access complex linear algebra operations, you have two options. The standard way is to use the LinearAlgebra property with the generic type argument of CoreImplementationsT equal to the type of real values. This gives access to the full range of operations.

The second way is through the LinearAlgebra property where the generic type argument of CoreImplementationsT equals the element type of the operation. When the element type is real, this gives exactly the same methods as the LinearAlgebra. When the element type is complex, however, there are a few differences. Most notably, methods that return norms of complex vectors and matrices also return complex numbers.

Copyright (c) 2004-2021 ExoAnalytics Inc.

Send comments on this topic to support@extremeoptimization.com

Copyright © 2004-2021, Extreme Optimization. All rights reserved.
Extreme Optimization, Complexity made simple, M#, and M Sharp are trademarks of ExoAnalytics Inc.
Microsoft, Visual C#, Visual Basic, Visual Studio, Visual Studio.NET, and the Optimized for Visual Studio logo
are registered trademarks of Microsoft Corporation.