# Core Features

## Array Classes

ILNumerics is based on efficient generic array classes - capable of serving as scalar, vector, matrix or n-dimensional arrays, especially supporting real and complex elements in single and double precision and integer elements, where applicable. Arrays exist as dense arrays, logical arrays and cells.

The API has been designed with the most convenient syntax in mind. Language features are tightly oriented towards popular mathematical scripting languages. Efficient subarray creation, array modifications and overloaded operators allow for an intuitive syntax - without any performance sacrifice.

## Built In Functions

For numerical arrays ILNumerics provides a large collection of computational functions covering a wide range of numeric algebra. Included are trigonometric functions, all important matrix decompositions, equation solver, eigenvalues, efficient sorting and integral transformations. They serve as the fundamental base of higher level algorithms in ILNumerics.

• ### Algebraic Functions

All important trigonometric functions are included in the collection of built in functions: cos, sin, tan, the inverse trigonometric functions asin, acos, atan2 and its hyperbolic counterparts sinh, cosh, and tanh. A large collection of common array manipulation functions is provided, which includes abs, all, and, any, cart2pol, ceil, cell, conj, diff,empty, exp, eye, find, fix, fliplr, flipud, floor, ge, gt, horzcat, imag, ccomplex, ind2sub, isempty, isequal, isequalwithequalnans, isfinite, isinf, isnan, isneginf, isnull, isnullorempty, isposinf, le, load, log, log10, logspace, lt, max, maxall, mean, meshgrid, min, minall, mod, multiply, neq, ones, or, pol2cart, pow, prod, r, rand, randn, randperm, real, real2complex, real2fcomplex, repmat, reshape, round, set, sign, sort, sqrt, sub2ind, subtract, sum, sumall, trace, vec, vertcat, xor, and zeros.

• ### Linear Algebra

Processor specific BLAS libraries highly speed up all matrix computations. ILNumerics relies on Intels® performance optimized Math Kernel Library (MKL) as reliable LAPACK implementation. Custom implementations can get incorporated. Out of the box, all standard matrix decompositions (SVD, QR, LU, PINV, CHOL, ...), linear equation solvers, generalized eigenvalues and all common miscellaneous matrix operations like determinants and rank retrieval are provided.

• ### Fourier Transforms

State of the art FFT routines enable the full spectrum of fourier transforms for single and double precision arrays: real and complex transforms, forward and backward transforms and transformations in one, two or n-dimensions. FFTs rely on the MKL internally. Prepared interfaces exist for FFTW and for AMDs ACML.

• ### Sorting

Based on the quick sort algorithm, sorting is possible for numerical arrays along arbitrary dimensions, with optional index retrieval. ILNumerics sorting easily beats the speed of the .NET implementation (Array.Sort) by factors.

# Visualizations

## Plot controls

ILNumerics provides plotting panels for plot generation. A panel, derived from Windows.Forms.Control, serves as flexible container for all kinds of plotting types. The output is driven by OpenGL. The panel provides the following features:

• Automatic user interaction: rotation, zoom, translation, auto axis scaling
• Flexible configurable scene graphs
• Simple design of custom plots from a collection of predefined basic shapes
• Support for light and transparency
• Pixel exact alignment for any size: from huge to tiny panels

## Scene graphs

Out of the box ILNumerics bring some basic plotting types: line, image, and surface plots. For the creation of custom plots, an efficient scene graph is provided. It allows the assembly of complex plots out of a large collection of basic point, line, quads, triangle, or polygon shapes. Lit shapes exist where applicable.

## Configurability

The objects in the ILNumerics.Drawing namespace do all follow a clean object hierarchy. All properties are addressed by a logical path from the root to the object in question. Object names are chosen in a way which is widely accepted by the scientific community. For example, in order to set the color of the label of the Y axis to red: panel.YAxis.Label.Color = Color.Red; is used.

The scene graph allows for an efficient re-configuration at runtime. This enables the creation of dynamic scenes. Custom plot objects can be optimized for the handling of large data sets while still supporting smooth interaction.

# Toolboxes

## Machine Learning

A number of machine learning algorithms is provided. Every algorithm is optimized for both: memory consumption and execution speed. The range of algorithms spreads from supervised to unsupervised algorithms and each provides a convenient variable parameter list.

• Expectation Maximization (em) - estimate centers and covariance of n multivariate normal distributions according to the samples
• k Nearest Neighbors (knn) - find the k nearest neighbors for every input sample, handles several distance metrics
• Ordinary Least Squares Regression (ridge_regression) - creates a model of the sample data which can be used as (biased) predictor
• Kernel Ridge Regression (krr) - kernelized version of ridge regression, creates and applies the model with a number of different kernels
• Principal Component Analysis (pca) - finds orthogonal directions used to reduce the dimensionality of the data
• k Means Clustering (kmeansclust) - splits the data into a given number of clusters

## Statistical Functions

The following common functions for statistical operations are included:

• cov - covariance matrix
• mean
• median
• mvnpdf - probability density function of a multivariate normal distribution
• mvnrnd - choose samples from a multivariate normal distribution
• rand - choose uniformly distributed samples
• randn - choose normally distributed samples
• randperm - permute integers randomly
• std - standard deviation
• var - variance
• select - select n-th smallest element
• nansum - sum ignoring nan values
• nanmean - mean ignoring nan values

# Help Sources

ILNumerics provides the following sources for help:

# Miscellaneous Features

• ILNumerics is designed for .NET framework version 4.0. On mono we recommend at least version 2.10.
• Support for 32 (.NET CLR / mono) and 64 bit (.NET CLR)
• For linear algebra operations, Intels® optimized Math Kernel Library (MKL) is used, which is part of the ILNumerics distribution.
• Numerical arrays support the loading and saving of Matlab® *.m files, version 6.
• Determination of extended machine properties and numerical constants.
• Support for special numerical states: NaN,+/-Inf.
• Support for sized empty arrays.

## Microsoft® Visual Studio® Integration

• Full intellisense support
• Custom debugger visualizer for arrays and cells
• (Grapical visualizers soon to come)
Visit the Comparison in the ILNumerics Developer Blog

# Performance

## Memory Efficiency

While the .NET runtime does an excellent job cleaning up small objects, large numerical arrays cause a serious hit on the GC if created frequently. ILNumerics collects memory in a pool for subsequent requests. The memory footprint of the application decreases drastically.

## Execution Speed

ILNumerics mostly runs several times faster than other popular mathematical frameworks. The speed is comparable to native C libraries. This is achieved by saving time in GC, increased memory locality of the data, profound loop optimizations and parallelism.

## Monitoring

A number of ILNumerics performance counters is exposed to the Windows Performance Monitor. They give detailed insight into the runtime behaviour, helping to localize possible areas of concern and to gather runtime statistics. The whole spectrum of sophisticated commercial profiling tools is available as well.