打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Armadillo (C++ library)

Armadillo (C++ library)

http://en.wikipedia.org/wiki/Armadillo_(C%2B%2B_library)

点击打开链接


From Wikipedia, the free encyclopedia
Armadillo C++ Library
Stable release 4.300 / May 2, 2014; 3 months ago
Written in C++
Operating system Cross-platform
Available in English
Type Software library
License open source (MPL)
Website arma.sourceforge.net
Armadillo is a linear algebra software library for the C++ programming language. It aims to provide an 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 precision), complex numbers, and a subset of trigonometric and statistics functions. Various matrix decompositions are provided through optional integration with Linear Algebra PACKage (LAPACK) and Automatically Tuned Linear Algebra Software (ATLAS) libraries.[1][2] High performance LAPACK replacement libraries such as Math Kernel Library (MKL) and AMD Core Math Library (ACML) can also be used.

The library employs a delayed evaluation approach (during compile time) 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.

Armadillo is related to the Boost Basic Linear Algebra Subprograms (uBLAS) library, which also uses template metaprogramming. However, Armadillo builds upon ATLAS and LAPACK libraries, thereby providing machine-dependent optimisations and functions not present in uBLAS.

It is open source software distributed under the Mozilla Public License, making it applicable for the development both open source and proprietary software. The project is supported by the NICTA research centre in Australia and is hosted by SourceForge.

Contents [hide]
1 Example
2 See also
3 References
4 External links
Example[edit]
Here is a trivial example demonstrating Armadillo functionality:

  1. #include <iostream>  
  2. #include <armadillo>  
  3.   
  4. using namespace std;  
  5. using namespace arma;  
  6.   
  7. int main()  
  8. {  
  9. vec b;  
  10. b << 2.0 << 5.0 << 2.0;  
  11.   
  12. // endr represents the end of a row  
  13. // in a matrix  
  14. mat A;  
  15. A << 1.0 << 2.0 << endr  
  16. << 2.0 << 3.0 << endr  
  17. << 1.0 << 3.0 << endr;  
  18.   
  19. cout << "Least squares solution:" << endl;  
  20. cout << solve(A,b) << endl;  
  21.   
  22. return 0;  
  23. }  


See also[edit]
Portal icon Free software portal
MLPACK (C++ library)
Blitz++
IT++
Numerical linear algebra
List of numerical libraries
List of numerical analysis software
Scientific computing
References[edit]
Jump up ^ Sanderson, Conrad (September 2010). "Armadillo: An Open Source C++ Linear Algebra Library for Fast Prototyping and Computationally Intensive Experiments". Technical Report. NICTA.
Jump up ^ Ryan Curtin et al. (2013). "MLPACK: A Scalable C++ Machine Learning Library". Journal of Machine Learning Research (JMLR) 14 (Mar): 801–805.
External links[edit]
Official website


  • Armadillo is a C++ template library for linear algebra. It is built upon LAPACK and BLAS. It offers a simple API that is similar to that of Matlab.

    1. Download the source code of Armadillo from here. Unzip the source code of Armadillo to a directory.

    2. Create an environment variable named ARMADILLO_ROOT with a value of the Armadillo directory.

    3. Armadillo requires LAPACK and BLAS libraries for any non-trivial matrix operation. To enable it to use these libraries, open$(ARMADILLO_ROOT)/include/armadillo_bits/config.hpp and uncomment the defines ofARMA_USE_LAPACK and ARMA_USE_BLAS.

    4. To use Armadillo in your Visual C++ project, add $(ARMADILLO_ROOT)/include as an Include directory.

    5. Since Armadillo source code uses LAPACK and BLAS, your project needs to link with these libraries. Armadillo ships with pre-built 32-bit .lib and .dll files for LAPACK and BLAS. Add $(ARMADILLO_ROOT)/examples/lib_win32 as Library directory to your project. Add blas_win32_MT.lib and lapack_win32_MT.lib as additional dependencies to your project.

    6. Include the armadillo header file in your source code. Use the Armadillo classes and methods in your code. Remember to use the namespace arma:: Your code should compile to an EXE file without any further problems.

    7. Copy the blas_win32_MT.dll and lapack_win32_MT.dll files from$(ARMADILLO_ROOT)/examples/lib_win32 to the directory that contains your EXE file. Your program should execute successfully now.

    Tried with: Armadillo 3.920.2 and Visual Studio 2010


  • http://choorucode.com/2013/11/15/how-to-use-armadillo-on-windows/

    How to use Armadillo on Windows


  • Latest Files

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
Building From Source on Windows
C语言矩阵运算库大起底
Compiling VASP 5.3.3 with OpenMPI 1.6.5 and Intel 12.1.5
如何在VC中调用CLAPACK
(非)线性方程组求解库大全
Python下科学计算包numpy和SciPy的安装【原创】
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服