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
How to prevent cmake to not add all targets from external dependencies using modern cmake constructs
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...
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...
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...
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...
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 ...
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
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...
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...
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...
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...
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 ...
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 ...
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...
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...
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...
3
Solved
1 Next >
© 2022 - 2024 — McMap. All rights reserved.