当前位置:网站首页>Armadillo安装
Armadillo安装
2022-06-22 06:21:00 【高堂明镜悲白发】
Armadillo是一个矩阵运算的库
Armadillo安装
下载地址
http://arma.sourceforge.net/download.html
解压到适当位置即可
cmake 引入
参考文档
https://cmake.org/cmake/help/latest/module/FindArmadillo.html
cmake_minimum_required(VERSION 3.21)
project(test_0_1)
set(CMAKE_CXX_STANDARD 17)
set(ARMADILLO_INCLUDE_DIR "D:/ProgramData/armadillo-11.0.0/include")
set(ARMADILLO_LIBRARIES "D:/ProgramData/armadillo-11.0.0/examples/lib_win64")
include_directories(${ARMADILLO_INCLUDE_DIR})
add_executable(${PROJECT_NAME} main.cpp)
运行示例
CMakeList.txt文件如上,
程序文件:
#include <iostream>
#include <armadillo>
int main()
{
arma::mat A = arma::randu<arma::mat>(4, 5) * 10;
arma::mat B = arma::randu<arma::mat>(4, 5) * 10;
arma::mat C = A % B;
A.print("A = \n");
B.print("B = \n");
C.print("A .* B = \n");
system("pause");
return 0;
}
边栏推荐
- Surfer格网文件裁剪
- WPS文档目录更新产生的问题记录
- tab[i = (n - 1) & hash] 的详细解读
- Oracle之trim,ltrim,rtrim三个函数的用法
- New GDI functions and functions introduced in MiniGUl version 1.1.0 (II)
- Shengxin visualization (Part2) -- box diagram
- e.hash & oldCap == 0 详细解读
- 【Rust笔记】04-表达式
- Geoswath plus technology and data acquisition and processing
- 相干声呐GeoSwath的综述
猜你喜欢

Dynamically create object execution methods

Generics in C #

Breakthrough in rich device platform: dayu200 based on rk3568 enters the openharmony 3.1 release trunk

Configuration files required for SSM integration and error reports caused by common configuration errors
![tab[i = (n - 1) & hash] 的详细解读](/img/be/3e84b3e8406833c2a235494f1a035f.png)
tab[i = (n - 1) & hash] 的详细解读

【OpenAirInterface5g】RRC NR解析之RrcSetupRequest

Single cell paper record (Part14) -- costa: unsupervised revolutionary neural network learning for St analysis

Expert PID control in Simulink

BlockingQueue四组API

Single cell paper record (Part11) -- clustermap for multi-scale clustering analysis of spatial gene expression
随机推荐
性能对比分析
五大常考SQL面试题
Lock锁(重点)
Discrete PID control based on MATLAB
On the definition of jinja2 macro
Upload file prompt 413 request entity too large error
Mail sending function is realized through SMTP protocol and exchange
MiniGUl 1.1.0版本引入的新GDI功能和函数(二)
Class load memory analysis
【OpenAirInterface5g】ITTI消息收发机制
SQL injection vulnerability (XIV) XFF injection attack
[PHP] composer 安装
CMake 入门级别语法
Stream流式计算
878. 第 N 个神奇数字 数学+二分
信息系统项目管理 - 范围管理(划重点)
Performance comparison and analysis
Detailed explanation of eight locks
Surfer格网文件裁剪
MYSQL牛客刷题