Vec object type
Vec is a template class mainly for numerical vectors. We can define any type of vector and the number of components:
Vec<double,19> myVector;
We can also use any of the predefined types:
typedef Vec<uchar, 2> Vec2b; typedef Vec<uchar, 3> Vec3b; typedef Vec<uchar, 4> Vec4b; typedef Vec<short, 2> Vec2s; typedef Vec<short, 3> Vec3s; typedef Vec<short, 4> Vec4s; typedef Vec<int, 2> Vec2i; typedef Vec<int, 3> Vec3i; typedef Vec<int, 4> Vec4i; typedef Vec<float, 2> Vec2f; typedef Vec<float, 3> Vec3f; typedef Vec<float, 4> Vec4f; typedef Vec<float, 6> Vec6f; typedef Vec<double, 2> Vec2d; typedef Vec<double, 3> Vec3d; typedef Vec<double, 4> Vec4d; typedef Vec<double, 6> Vec6d;
All the following vector operations are also implemented:
v1 = v2 + v3
v1 = v2 - v3
v1 = v2 * scale
v1 = scale * v2
v1 = -v2
v1 += v2
v1 = v2 + v3
v1 = v2 - v3
v1 = v2 * scale
v1 = scale * v2
v1 = -v2
v1 += v2
Other augmenting operations implemented are the following:
v1 == v2, v1 != v2
norm(v1) (euclidean norm).
推薦閱讀
- Building Computer Vision Projects with OpenCV 4 and C++
- ETL數據整合與處理(Kettle)
- Hands-On Machine Learning with Microsoft Excel 2019
- 輕松學大數據挖掘:算法、場景與數據產品
- 使用GitOps實現Kubernetes的持續部署:模式、流程及工具
- Python醫學數據分析入門
- 深入淺出Greenplum分布式數據庫:原理、架構和代碼分析
- 數據中心數字孿生應用實踐
- 云原生數據中臺:架構、方法論與實踐
- 數據科學實戰指南
- Unreal Engine Virtual Reality Quick Start Guide
- SQL Server 2012實施與管理實戰指南
- 爬蟲實戰:從數據到產品
- 從實踐中學習sqlmap數據庫注入測試
- 數據庫與數據處理:Access 2010實現