[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
vigra::multi_math |
Arithmetic and algebraic functions for multi-dimensional arrays. More...
Arithmetic and algebraic functions for multi-dimensional arrays.
Namespace vigra::multi_math
holds VIGRA's support for efficient arithmetic and algebraic functions on multi-dimensional arrays (that is, MultiArrayView and its subclasses). All multi_math
functions operate element-wise. If you need matrix multiplication, use Linear Algebra instead.
In order to avoid overload ambiguities, multi-array arithmetic must be explicitly activated by
(this should not be done globally, but only in the scope where the functionality is actually used).
You can then use the standard operators in the expected way:
etc. (supported operators are + - * / ! ~ % && || == != < <= > >= << >> & | ^ = += -= *= /=
, with both scalar and array arguments).
Algebraic functions are available as well:
The following functions are implemented: abs, erf, even, odd, sign, signi, round, roundi, sqrt, sqrti, sq, norm, squaredNorm, gamma, loggamma, exp, log, log10, sin, sin_pi, cos, cos_pi, asin, acos, tan, atan, floor, ceil, conj, real, imag, arg, atan2, pow, fmod, min, max
, provided the array's element type supports the respective function.
Supported element types currently include the built-in numeric types, TinyVector, RGBValue, std::complex
, and FFTWComplex.
In addition, multi_math
supports a number of functions that reduce arrays to scalars:
Expressions are expanded so that no temporary arrays have to be created. To optimize cache locality, loops are executed in the stride ordering of the left-hand-side array.
#include <vigra/multi_math.hxx>
Namespace: vigra::multi_math
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|