Eigen
4月16!
平时记录用,不喜忽喷
展开
-
Eigen::Matrix 转 std::vector 亲测ok!
【代码】Eigen::Matrix 转 std::vector 亲测ok!原创 2023-11-23 10:57:37 · 660 阅读 · 0 评论 -
Eigen::tensor slice操作
Eigen::Tensor<int, 2> a(4, 3); a.setValues({ {0, 100, 200}, {300, 400, 500}, {600, 700, 800}, {900, 1000, 1100} }); Eigen::array<Eigen::DenseIndex, 2> offsets = { 1, 0 }; Eigen::array<Eigen::DenseIndex, 2> extents = { 2, 2 };.原创 2022-01-21 18:41:07 · 1964 阅读 · 2 评论 -
空间点到空间直线的垂点计算
有一个参考的博客,大家搜一下就可以找到,这是我用到的用eigen库的 //pt 空间外一点//begin-end 直线上的两个点Eigen::Vector3d GetFootOfPerpendicular(const Eigen::Vector3d &pt, const Eigen::Vector3d &begin, const Eigen::Vector3d &end) //pt:point outside line { a.原创 2020-11-24 17:20:55 · 1140 阅读 · 2 评论 -
从旋转向量到旋转矩阵的转化公式
这个博客是公式详解:https://www.cnblogs.com/xpvincent/archive/2013/02/15/2912836.html Eigen::Matrix3d constructMatrix(Eigen::RowVector4d rotationVector) { double x = rotationVector(0, 0); double y = rotationVector(0, 1); double z...原创 2020-10-22 11:54:18 · 660 阅读 · 0 评论 -
Eigen 旋转向量与旋转矩阵(用法)
1、旋转矩阵-------旋转向量 Eigen::AngleAxisd rotation_vector2; rotation_vector2.fromRotationMatrix(rotation_matrix2);或者 Eigen::AngleAxisd rotation_vector2(rotation_matrix2); 打印可以输出: 旋转角,旋转向量 cout << "rotation_vector2 " << "an...原创 2020-09-14 14:51:46 · 14842 阅读 · 0 评论 -
mac 配置eigen
#include<iostream>using namespace std;#include<Eigen/Core>#include<Eigen/Dense>int main (int argc, char** argv) { cout << "Eigen successful." << endl; return...原创 2019-09-10 15:54:25 · 537 阅读 · 0 评论 -
Eigen 矩阵相关运算函数
https://www.cnblogs.com/python27/p/EigenQuickRef.html原创 2019-08-28 11:42:59 · 572 阅读 · 0 评论