Armadillo is a
linear algebra
Linear algebra is the branch of mathematics concerning linear equations such as:
:a_1x_1+\cdots +a_nx_n=b,
linear maps such as:
:(x_1, \ldots, x_n) \mapsto a_1x_1+\cdots +a_nx_n,
and their representations in vector spaces and through matric ...
software library for the
C++ programming language. It aims to provide efficient and streamlined base calculations, while at the same time having a straightforward and easy-to-use interface. Its intended target users are scientists and engineers.
It supports integer, floating point (
single and
double
A double is a look-alike or doppelgänger; one person or being that resembles another.
Double, The Double or Dubble may also refer to:
Film and television
* Double (filmmaking), someone who substitutes for the credited actor of a character
* Th ...
precision),
complex number
In mathematics, a complex number is an element of a number system that extends the real numbers with a specific element denoted , called the imaginary unit and satisfying the equation i^= -1; every complex number can be expressed in the for ...
s, and a subset of
trigonometric and
statistics functions. Dense and
sparse matrices are supported. Various
matrix decomposition
In the mathematical discipline of linear algebra, a matrix decomposition or matrix factorization is a factorization of a matrix into a product of matrices. There are many different matrix decompositions; each finds use among a particular class of ...
s are provided through optional integration with Linear Algebra PACKage (
LAPACK
LAPACK ("Linear Algebra Package") is a standard software library for numerical linear algebra. It provides routines for solving systems of linear equations and linear least squares, eigenvalue problems, and singular value decomposition. It al ...
),
Automatically Tuned Linear Algebra Software (ATLAS), and
ARPACK. High-performance BLAS/LAPACK replacement libraries such as
OpenBLAS
In scientific computing, OpenBLAS is an open-source implementation of the BLAS (Basic Linear Algebra Subprograms) and LAPACK APIs with many hand-crafted optimizations for specific processor types. It is developed at the Lab of Parallel Softw ...
and
Intel MKL
Intel oneAPI Math Kernel Library (Intel oneMKL; formerly Intel Math Kernel Library or Intel MKL) is a library of optimized math routines for science, engineering, and financial applications. Core math functions include BLAS, LAPACK, ScaLAPAC ...
can also be used.
The library employs a
delayed-evaluation approach (during
compile time
In computer science, compile time (or compile-time) describes the time window during which a computer program is compiled.
The term is used as an adjective to describe concepts related to the context of program compilation, as opposed to concept ...
) to combine several operations into one and reduce (or eliminate) the need for temporaries. Where applicable, the order of operations is optimised. Delayed evaluation and optimisation are achieved through
template metaprogramming
Template metaprogramming (TMP) is a metaprogramming technique in which templates are used by a compiler to generate temporary source code, which is merged by the compiler with the rest of the source code and then compiled. The output of these t ...
.
Armadillo is related to the
Boost
Boost, boosted or boosting may refer to:
Science, technology and mathematics
* Boost, positive manifold pressure in turbocharged engines
* Boost (C++ libraries), a set of free peer-reviewed portable C++ libraries
* Boost (material), a material b ...
Basic Linear Algebra Subprograms (uBLAS) library, which also uses
template metaprogramming
Template metaprogramming (TMP) is a metaprogramming technique in which templates are used by a compiler to generate temporary source code, which is merged by the compiler with the rest of the source code and then compiled. The output of these t ...
. However, Armadillo builds upon
ATLAS
An atlas is a collection of maps; it is typically a bundle of maps of Earth or of a region of Earth.
Atlases have traditionally been bound into book form, but today many atlases are in multimedia formats. In addition to presenting geograp ...
and
LAPACK
LAPACK ("Linear Algebra Package") is a standard software library for numerical linear algebra. It provides routines for solving systems of linear equations and linear least squares, eigenvalue problems, and singular value decomposition. It al ...
libraries, thereby providing machine-dependent optimisations and functions not present in uBLAS.
It is
open-source software
Open-source software (OSS) is computer software that is released under a license in which the copyright holder grants users the rights to use, study, change, and distribute the software and its source code to anyone and for any purpose. Ope ...
distributed under the permissive
Apache License, making it applicable for the
development of both
open source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
and
proprietary software. The project is supported by the
NICTA research centre in Australia.
An
interface
Interface or interfacing may refer to:
Academic journals
* ''Interface'' (journal), by the Electrochemical Society
* '' Interface, Journal of Applied Linguistics'', now merged with ''ITL International Journal of Applied Linguistics''
* '' Int ...
to the
Python language is available through th
PyArmadillopackage,
which facilitates prototyping of algorithms in Python followed by relatively straightforward conversion to C++.
Example in C++ 11
Here is a trivial example demonstrating Armadillo functionality:
// Compile with:
// $ g++ -std=c++11 main.cpp -o file_name -O2 -larmadillo
#include
#include
#include
int main()
Example in C++ 98
Here is another trivial example in C++ 98:
#include
#include
int main()
See also
*
mlpack
*
List of numerical analysis software
Listed here are notable end-user computer applications intended for use with numerical or data analysis:
Numerical-software packages
General-purpose computer algebra systems
Interface-oriented
Language-oriented
Historically significa ...
*
List of numerical libraries
This is a list of numerical libraries, which are libraries used in software development for performing numerical calculations. It is not a complete listing but is instead a list of numerical libraries with articles on Wikipedia, with few exceptio ...
*
Numerical linear algebra
Numerical linear algebra, sometimes called applied linear algebra, is the study of how matrix operations can be used to create computer algorithms which efficiently and accurately provide approximate answers to questions in continuous mathematics ...
*
Scientific computing
Computational science, also known as scientific computing or scientific computation (SC), is a field in mathematics that uses advanced computing capabilities to understand and solve complex problems. It is an area of science that spans many disc ...
References
External links
*
{{DEFAULTSORT:Armadillo (C++ library)
Articles with example C++ code
C++ numerical libraries
Free computer libraries
Free mathematics software
Free science software
Free software programmed in C++
Free statistical software
Numerical linear algebra
Software using the Apache license