eigen3 Questions
2
Solved
I have the following Eigen Tensor:
Eigen::Tensor<float, 3> m(3,10,10);
I want to access the 1st matrix. In numpy I would do it as such
m(0,:,:)
How would I do this in Eigen
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...
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 ...
2
I am trying to wrap up a c++ function that takes in Eigen::Quaternion as the argument for python usage.
The function is defined as something like:
void func(const Eigen::Quaternion<double> &a...
3
Solved
I did a MATLAB code and I am trying to do it in C++ using Eigen library.In my MATLAB code I had to do a particular function like this
M=10;
s1 = zeros(20,M);
for i=1:M
s1(:,i) = i*i;%some functio...
2
I had some code in Python3 (with numpy) that I wanted to convert to C++ (with eigen3) in order to get a more efficient program. So I decided to test a simple example to assess the performance gain ...
Earful asked 10/7, 2019 at 16:39
4
I'm trying to use tensorflow as a external library in my C++ application (mainly following this tutorial). What I done so far:
I have cloned the tensorflow reporitory (let's say, that the repo ro...
Cobber asked 13/10, 2017 at 13:31
3
I wrote a function that multiplies Eigen matrices of dimension 10x10 together. Then I wrote a naive multiply function CustomMultiply which was surprisingly 2x faster than Eigen's implementation.
I...
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...
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 ...
2
I am trying to traverse Eigen::MatrixXd matrix. However, there does not seem to be a function that returns the columns size nor the row size. Does anybody have an idea on how to do this?
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
1
Solved
I am trying to compile the example provided for Eigen::JacobiSVD and I am getting the following error,
/usr/local/include/eigen3/Eigen/src/SVD/JacobiSVD.h: In instantiation of ‘Eigen::JacobiSVD<...
3
Solved
0
I have the following issue when compiling in release mode
using MSVC 19.31.31106.2 (and C++17, as far as I understand the eigen page, alignment should be not an issue anymore) that I get a segfault...
3
Solved
I'm implementing a spectral clustering algorithm and I have to ensure that a matrix (laplacian) is positive semi-definite.
A check if the matrix is positive definite (PD) is enough, since the "se...
2
Solved
I have followed the instructions for updating my GDB for use with Eigen3. However, the CLion IDE is unable to load the contents of eigen matrices in the debug panel.
What should be a quick valida...
2
Solved
Here it is written that std::ranges::size should return an unsigned integer. However, when I use it on an Eigen vector (with Eigen 3.4) the following compiles:
Eigen::VectorXd x;
static_assert(std:...
Nostalgia asked 22/12, 2021 at 18:26
3
Solved
When trying to initialize a Vector using the result of some operation in Eigen, the result seems to be different depending on what syntax is used, i.e., on my machine, the assertion at the end of t...
5
Solved
I have a question about Eigen library in C++. Actually, I want to calculate inverse matrix of sparse matrix.
When I used Dense matrix in Eigen, I can use .inverse() operation to calculate inverse ...
Latterly asked 19/9, 2014 at 8:14
2
Solved
I am trying to index a matrix in indexes which follow an arithmetic sequence. According to the Eigen tutorial on the official website, I should use Eigen::seq(firstVal, lastVal, step) to generate t...
2
Do the memory alignment issues with Eigen listed in the documentation still apply with C++11? It seems that C++11 can already take care of properly aligning objects on the stack and on the heap, wi...
Adeliaadelice asked 9/4, 2015 at 10:44
2
Solved
I just started using Eigen library and can't understand how to add a scalar value to all matrix's members?
Let's suppose that I have a matrix:
Eigen::Matrix3Xf mtx = Eigen::Matrix3Xf::Ones(3,4);
mt...
2
Solved
I am try to use the Eigen library to create splines. However once I create a spline, I don't know how to get what the value would be at a given point x.
See example below with explanations of my i...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.