eigen Questions

1

Solved

I am curious to why multiplying a sparse-matrix by a dense-matrix takes a different time than the reverse. Are the algorithms significantly different? Here's an example in matlab 2018a: a=sprand...
Yaekoyael asked 22/7, 2018 at 1:51

3

Solved

I am using 2D Eigen::Arrays for a project, and I like to keep using them in the case of huge 2D arrays. For avoiding memory issues, I thought to use memory mapped files to manage (read/modify/writ...

1

I'm looking to make a general, lazy evaluation-esque procedure to streamline my code. Right now, I have the ability to speed up the execution of mathematical functions - provided that I pre-proces...
Subsellium asked 13/7, 2018 at 1:50

1

I am using Eigen on a C++ program for solving linear equation for very small square matrix(4X4). My test code is like template<template <typename MatrixType> typename EigenSolver> Ver...
Pallaten asked 18/6, 2018 at 12:19

4

Solved

Idea is to multiply two matrix. And do same multiplication using Eigen, then check if result is the same. In the following making N = 2 returns same thing but N = 1000 returns NOT same thing. Why?...
Oblivion asked 10/6, 2018 at 8:4

2

Solved

Preamble Some time ago I asked a question about performance of Matlab vs Python (Performance: Matlab vs Python). I was surprised that Matlab is faster than Python, especially in meshgrid. In the d...
Barr asked 12/10, 2017 at 16:7

4

Solved

I would like to use the Eigen matrix library as the linear algebra engine in my program. Eigen uses expression templates to implement lazy evaluation and to simplify loops and calculations. For ex...
Vanderhoek asked 11/6, 2012 at 7:58

3

Solved

How to get text representation for Vector3f or other types in Eigen library. I see lot of examples that uses .format() which returns WithFormat class. This then can be used with cout. However I'm l...
Aylesbury asked 29/5, 2016 at 9:0

1

Solved

In C++11, I need to call a function recursively from 0,...,n (where n is a compile time constant). This is the structure of the problem, which appears to be fatally flawed: #include "Eigen/Dense" ...
Aronarondel asked 8/5, 2018 at 12:11

3

Solved

I have been googling for a while now, but cant find the answer to this simple question. In matlab i can do this: rows = [1 3 5 9]; A = rand(10); B = A(rows, : ); How do i do this in eigen? It d...
Otherworld asked 16/10, 2016 at 19:51

2

Solved

How can I convert from an Armadillo Matrix to an Eigen MatrixXd and vice versa? I have nu as an arma::vec of size N, z as arma::mat of dimension N x 3. I want to compute a matrix P such as the ent...
Squalene asked 12/10, 2017 at 2:40

1

Solved

I am trying to use Eigen unsupported FFT library using FFTW backend. Specifically I am want to do a 2D FFT. Here's my code : void fft2(Eigen::MatrixXf * matIn,Eigen::MatrixXcf * matOut) { const i...
Gawlas asked 5/4, 2018 at 16:5

2

I understand that the Tensor class supports slicing, but when I tried to do slicing on a TensorMap instance, the error is that the operation is not supported. How can I slice a TensorMap?
Deal asked 22/1, 2017 at 17:50

3

Solved

I want to extract the three first values of a Vector4 type in Eigen, into a Vector3 type. So far I am doing it in a for-loop. Is there a smarter way to do it?
Balkhash asked 3/8, 2014 at 12:33

4

Solved

I'm trying to minimize a following sample function: F(x) = f[0]^2(x[0],...,x[n-1]) + ... + f[m-1]^2(x[0],...,x[n-1]) A normal way to minimize such a funct could be the Levenberg-Marquardt algori...
Silverware asked 29/8, 2013 at 11:5

1

So let's say I have a 4D Eigen::Tensor T. Similarly I also have a 4D Tensorflow::Tensor X with the same shape as T int size = T.dimension(0); int rows = T.dimension(1); int cols = T.dimension(...
Disembarrass asked 17/8, 2016 at 18:46

3

Solved

I just restarted working on a project which has been on hold for a few months. Last time I compiled it it was working just fine, without any error nor warning. Yet when I tried to compile it earlie...
Dara asked 29/5, 2015 at 17:45

4

I am working on a project in ROS Indigo that requires using the Eigen libraries. According to indigo/Migration page on the ROS Wiki, the FindEigen.cmake module is now in the cmake_modules package. ...
Bechance asked 3/5, 2015 at 19:33

2

Solved

Suppose I have a MatrixXcf called A. I want to replace elements of every column by normalized one relative to the corresponding column. I've written following code but it's not true! for (int i = ...
Vickers asked 29/12, 2017 at 7:51

1

Solved

Where is the implementation of tf.extract_image_patches? I checked the tensorflow repository I could not find it. The file tensorflow/core/kernels/extract_image_patches_op.cc does not contain an i...
Typhon asked 20/10, 2017 at 22:17

7

Solved

I've got a lower triangular MatrixXd and I want to copy its lower values to the upper side as it'll become a symmetric matrix. How can I do it? So far I've done: MatrixXd m(n,n); ..... //do ...
Cusk asked 22/8, 2012 at 13:52

1

Solved

I implemented a comparison operator operator< for Eigen::VectorXd, and sometimes, I need to pass a compare function to another of my function, I am tired of wrapping the operator< into [](con...
Fixing asked 18/10, 2017 at 13:51

3

Solved

I have a rotation matrix rot (Eigen::Matrix3d) and a translation vector transl (Eigen::Vector3d) and I want them both together in a 4x4 transformation matrix. I just for the life of me can't figure...
Ovipositor asked 26/8, 2014 at 11:9

2

Solved

I need to extract the roll pitch yaw angles from a rotation matrix and I want to be sure that what I do is correct. Eigen::Matrix< simFloat, 3, 1> rpy = orientation.toRotationMatrix().eule...
Coen asked 16/12, 2014 at 15:38

1

Solved

Consider the following (working) snippet: Eigen::ArrayXd x (8); x << 1, 2, 3, 4, 5, 6, 7, 8; Eigen::TensorMap<Eigen::Tensor<double, 2>> y (x.data(), 2, 4); This is also works: ...
Vere asked 24/7, 2017 at 14:41

© 2022 - 2024 — McMap. All rights reserved.