eigen Questions

1

Solved

I compared the performance of 3x3 and 4x4 matrix multiplication using Eigen with the -O3 optimization flag, and surprisingly, I found that the 4x4 case is more than twice as fast as the 3x3 case! T...
Tamberg asked 26/8 at 16:23

1

Solved

I am trying to add external dependencies to my new cmake project in the cleanest and modern cmake way possible. I want to download these dependencies during configuration time. My problem is that a...
Recurved asked 19/5, 2021 at 8:39

3

Solved

Is there a function in Eigen to compare vectors (matrices) using both relative and absolute tolerance aka numpy.allclose? Standard isApprox fails if one of the vectors is very close to zero.
Syconium asked 24/2, 2013 at 11:39

2

I got different results using auto and using Vector when summing two vectors. My code: #include "stdafx.h" #include <iostream> #include "D:\externals\eigen_3_1_2\include\Eigen\Geometry" ty...
Gemstone asked 28/6, 2015 at 11:26

2

Using the Eigen C++ library, how can I make a deep copy of a matrix? For example, if I have: Eigen::Matrix4f A; Eigen::Matrix4f B = A; And then I modify A, it will also modify B. But I want B to...
Resplendence asked 24/3, 2015 at 11:43

3

Although Eigen is C++ library and C/C++ use row-major storage structure, why Eigen prefers to use column-major storage order? From Why does MATLAB use column-major order? post, I understand that MA...
Loot asked 10/4, 2020 at 12:48

4

Solved

How do you initialize a boolean array in the Eigen library (C++) to a specific truth value? There are initializers for numeric matrices but I can't find an example for a boolean array (Eigen::Array...
Arcadia asked 13/11, 2014 at 4:57

2

I have been testing the Tensor module from Eigen3 for a new project. Even when the module is not yet finished, it seems to have most of the functionality that I need. But there is one part that I ...
Casting asked 15/10, 2018 at 18:19

6

I'm trying to implement a functionality that can convert an Euler angle into an Quaternion and back "YXZ"-convention using Eigen. Later this should be used to let the user give you Euler angles and...
Chaldron asked 23/7, 2015 at 14:10

1

Recently, I was made aware of the potential issues of memory alignment for Fixed-size vectorizable Eigen objects. The correct code as stated in the doc: class Foo { ... Eigen::Vector2d v; ... pu...
Hyatt asked 2/8, 2020 at 12:48

7

After multiplying a lot of rotation matrices, the end result might not be a valid rotation matrix any more, due to rounding issues (de-orthogonalized) One way to re-orthogonalize is to follow thes...
Nogas asked 15/4, 2014 at 10:15

6

Solved

How do I create a rotation matrix using pitch, yaw, roll with Eigen library?
Izettaizhevsk asked 28/1, 2014 at 17:9

13

Solved

CMake cannot find my Eigen3 package. I set an environment variable called EIGEN3_INCLUDE_DIR pointing to the path where FindEigen3.cmake is. Then in the CMakelists.txt I wrote: find_package( E...
Presentable asked 3/9, 2012 at 13:48

4

Solved

Introduction I am writing tests on Eigen matrices using Google's testing framework Google-Mock, as already discussed in another question. With the following code I was able to add a custom Matche...
Clotilda asked 5/8, 2014 at 19:41

3

I read in this question that eigen has very good performance. However, I tried to compare eigen MatrixXi multiplication speed vs numpy array multiplication. And numpy performs better (~26 seconds v...
Niobous asked 4/7, 2014 at 4:52

2

Solved

I am somewhat new to Stack Overflow and C++ so feel free to correct any errors in my code and the formatting of this question. I am trying to make a linear regression calculator using the normal e...
Catchup asked 10/9, 2018 at 15:47

3

Solved

I used to be able to pass Eigen3 arrays/matrices to spdlog, which internally uses libfmt. Starting with libfmt 9.0.0, these types are no longer formatted by libfmt without further code. Custom type...
Jericajericho asked 16/9, 2022 at 18:18

5

Solved

I'm creating some functions to do things like the "separated sum" of negative and positive number, kahan, pairwise and other stuff where it doesn't matter the order I take the elements from the mat...
Perchloride asked 29/4, 2013 at 15:55

4

In MATLAB, the line below converts a matrix to a vector. It flattens the matrix column by column into a vector. myvar(:) How do I do that with Eigen? The solution should work for any dimension of ...
Heim asked 5/4, 2014 at 13:50

2

Solved

I have an Eigen (3.4.0) related question that really troubles me. In this C++ code, there's a function pass_by_nonconst_ref which takes a non-const reference to a eigen matrix, and that does ...
Monaghan asked 25/10, 2022 at 13:15

1

Solved

I am trying to find the maximum value of an Eigen tensor. I know how to do this using Eigen matrices but obviously this is not working for a tensor: Example static const int nx = 4; static const i...
Ravage asked 18/10, 2022 at 17:56

6

Suppose I have Eigen::VectorXd x; //{1,2,3,4,5,6,7,8} and Eigen::VectorXd ind_vec; //{0,2,4,5} Is there a way an easy way to extract the ind_vec elements of x? Something like: x.extract(i...
Kulak asked 8/10, 2014 at 22:0

0

After updating to GCC 12.1, I got a array subscript ‘__m256d_u[0]’ is partly outside array bounds error (or rather warning with -Werror) in my project, so I tried isolating the problem. Here's an M...
Unclench asked 5/7, 2022 at 14:26

3

Solved

How can I use Eigen within a C++ project that is built using Bazel (version 0.25.2)? I like to fetch the Eigen dependency using http_archive or git_repository. I've tried the following: main.cpp #i...
Herzl asked 16/5, 2019 at 16:7

3

Solved

I am using the Eigen C++ library downloadable from http://eigen.tuxfamily.org/. This is a C++ library for easier handling of Matrices and Arrays. I use g++ compiler and gdb for debugging. However, ...
Susumu asked 1/8, 2014 at 17:18

© 2022 - 2024 — McMap. All rights reserved.