eigen Questions
1
Solved
I have a function within which I want to convert an Eigen::MatrixXd object to arma::mat.
I am aware of this question but I can't seem to be able to correct the behavior that I'm getting. Calling ...
3
I'm trying to use Eigen::CholmodSupernodalLLT for Cholesky decomposition, however, it seems that I could not get matrixL() and matrixU(). How can I extract matrixL() and matrixU() from Eigen::Cholm...
3
Solved
I have a vector of integers and I want to construct a diagonal matrix with vectos's element as diagonal entries of the matrix. For example: if vector is 1 2 3 the diagonal matrix would be:
1 0 0
0...
1
I need to compute the n smallest magnitude eigen vectors of a very large sparse symmetric matrix in a C++ program. For my example, lets say n=30 and the matrix is 10k by 10k with about 70k non-zero...
Concavoconcave asked 31/7, 2014 at 17:46
1
Solved
I am using Eigen to set up a sparse linear system as follows (slightly pseudocode):
Eigen::SparseQR<Eigen::SparseMatrix<real_t>, Eigen::COLAMDOrdering<int>> solver;
Eigen::Sparse...
Hodge asked 8/8, 2019 at 23:15
1
Solved
Matrix multiplication is the only operation in Eigen that assumes aliasing by default.
MatrixXf mat1(2,2);
mat1 << 1, 2, 4, 7;
MatrixXf mat2 = mat1;
auto result = mat1 * mat2;
Eigen evalu...
3
Solved
I'm working on adding Sparse matrix support to an open source math library and would like to not have duplicated functions for both Dense and Sparse matrix types.
The below example shows an add fu...
Satisfy asked 9/8, 2019 at 8:42
2
Solved
I have only recently started exploring C++ Eigen library and a little puzzled with some of the documentation. It would be great if someone can clarify this.
In the common pitfalls (https://eigen....
3
Solved
I'm trying to sort an Eigen VectorXf x in ascending order.
This sorts it in descending order:
std::sort(x.data(),x.data()+x.size());
and this doesn't work:
bool myfunction (int i,int j) { retu...
2
I am trying to produce a function that can compute a series of weighted products
where W is a diagonal matrix. There are many W matrices but only a single X matrix.
To be efficient I can repre...
4
Solved
The setRandom function in the Eigen matrix library fills a given matrix with random numbers in the range [-1,1]. How can I extend this to generate numbers within any given range? I require floating...
4
Solved
I just played around with Eigen a bit and noticed that MatrixXf::Random(3,3) always returns the same matrices, first one is always this for example:
0.680375 0.59688 -0.329554
-0.211234 0.823295 0...
2
Solved
The popular linear algebra library Eigen comes with a long list of so-called "unsupported" modules, for example modules for FFT, numerical differentiation or Euler angles.
In the Eigen documentati...
5
Solved
Is there a reversible way to convert an OpenCV cv::Mat object to an Eigen::Matrix?
e.g., Some way of doing:
cv::Mat cvMat;
Eigen::Matrix eigMat;
camera->retrieve(cvMat);
// magic to convert cvMa...
1
As a newcomer to Eigen there is something I am battling to come to terms with.
With matrix multiplication Eigen creates a temporary by default to avoid aliasing issues:
matA = matA * matA; // wor...
1
Solved
I am confused about Eigen's QR decomposition. My understanding is that the matrix Q is stored implicitly as a sequence of Householder transformations, and that the matrix R is stored as an upper tr...
Wadsworth asked 8/5, 2019 at 19:6
2
Solved
I'm currently developing a Kalman Filtering library using Eigen and I've successfully gotten it working on my development Mac. Now I'm trying to set it up with Travis CI and CMake is having trouble...
1
I want to compile an open project, it needs Eigen3, I followed its guideline but stuck in this step:
"Set environment variable Eigen3_DIR to {YOUR_EIGEN3_DIRECTORY}/eigen3/cmake."
I have installe...
3
Solved
I am writing a generic class that utilizes Eigen data types. I already have problems assigning constructor arguments to class member variables. A simplified version of my code would be:
template &...
Adapter asked 1/4, 2019 at 12:56
1
Solved
I have this example code:
#include <Eigen/Eigen>
#include <iostream>
int main() {
Eigen::MatrixXf M = Eigen::MatrixXf::Random(1000, 1000);
std::cout.precision(17);
std::cout <&l...
3
Does Eigen have efficient type for store dense, fixed-size, symmetric matrix? (hey, they are ubiquitous!)
I.e. for N=9, it should store only (1+9)*9/2==45 elements and it has appropriate operation...
Brakeman asked 15/11, 2012 at 18:38
3
Consider the following minimal working example:
#include <iostream>
#include <math.h>
#include <eigen3/Eigen/Dense>
int main() {
// Set the rotation matrices that give an examp...
Delrosario asked 23/2, 2017 at 23:30
3
Solved
I have two eigen matrices and I would like to concatenate them, like in matlab cat(0, A, B)
Is there anything equivalent in eigen?
Thanks.
3
Solved
I am having an error when using the Eigen library and all I am trying to do is subtract a scalar from an Eigen::VectorXf. So, my code is something as follows:
#define VECTOR_TYPE Eigen::VectorXf
#...
3
Solved
I would like to take the element-wise max of two vectors/matrices in Eigen. So far, I've written this code:
template <typename S, typename T>
auto elemwise_max(const S & A, const T &...
© 2022 - 2024 — McMap. All rights reserved.