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 ...
Deil asked 30/9, 2019 at 22:28

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...
Bifocals asked 18/4, 2019 at 11:9

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...
Nealy asked 28/6, 2013 at 9:48

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...
Correspondence asked 9/8, 2019 at 10:28

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....
Nataline asked 3/8, 2019 at 19:36

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...
Gorizia asked 17/2, 2014 at 17:17

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...
Misogamy asked 27/1, 2017 at 21:53

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...
Extravagance asked 6/3, 2016 at 14:16

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...
Garlan asked 22/1, 2014 at 20:7

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...
Makeup asked 26/5, 2019 at 6:37

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...
Tupper asked 9/2, 2013 at 0:2

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...
Humming asked 16/5, 2019 at 13:46

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...
Giacinta asked 31/12, 2018 at 22:16

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...
Neva asked 8/1, 2018 at 4:55

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 &...

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...
Demott asked 19/3, 2019 at 16:21

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.
Hottempered asked 1/2, 2014 at 9:6

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 #...
Standoff asked 28/2, 2016 at 21:58

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 &...
Crosslet asked 20/7, 2016 at 16:19

© 2022 - 2024 — McMap. All rights reserved.