VIGRA supports various way to perform mathematical operations (arithmetic and algebraic functions, linear algebra) on arrays. Most of these functions operate element-wise.
-
Array Expressions
The vigra::multi_math module overloads the usual arithmetic operators and algebraic functions for array arguments, similar to Matlab and numpy. This leads to very efficient and readable code.
-
Linear Algebra
The vigra::linalg module implements linear algebra for 2-dimensional arrays. The main difference to multi_math (besides a different internal implementation) is that the multiplication operator realizes matrix multiplication here. In addition, this module implements linear system solvers, eigenvalue decomposition, and other standard matrix algorithms.
-
STL-style transformation algorithms
VIGRA also provides functions like transformMultiArray()
that generalize the corresponding STL functions to multiple dimensions. The functors needed for these functions are most easily created with the Functor Expressions module, VIGRA's "lambda library". This approach offers more flexibility than the array expressions above.
-
Feature Accumulators
The vigra::acc module provides powerful and efficient methods to compute statistics across entire arrays or arbitrary subparts of them.