eigen Questions

2

Solved

Having two int matrices A and B, with more than 1000 rows and 10K columns, I often need to convert them to float matrices to gain speedup (4x or more). I'm wondering why is this the case? I realiz...
Manaus asked 28/7, 2017 at 12:33

1

Solved

I want to use automatic differentiation mechanism provided by CppAD inside Eigen linear algebra. An example type is Eigen::Matrix< CppAD::AD,-1,-1>. As CppAD::AD is a custom numeric type the Num...
Plimsoll asked 20/7, 2017 at 16:41

2

I have implemented a Gauss-Newton optimization process which involves calculating the increment by solving a linearized system Hx = b. The H matrx is calculated by H = J.transpose() * W * J and b i...
Closefisted asked 6/7, 2017 at 1:13

3

Solved

Their are many links to go the other way round but I am unable to find to get a std::vector from a Eigen::Matrix or Eigen::VectorXd in my specific case.
Barbershop asked 29/9, 2014 at 7:14

1

Solved

It's possible to convert an Eigen::Map to a Matrix by assignment: vector<float> v = { 1, 2, 3, 4 }; auto m_map = Eigen::Map<Eigen::Matrix<float, 2, 2, Eigen::RowMajor>>(&v[0]...
Whimsicality asked 20/6, 2017 at 22:54

1

I am trying to find the pseudo-inverse of a matrix using the Eigen Library. They have a class that does implement it, however I do not know how to put script the syntax. This is how it is shown on...
Antiserum asked 9/6, 2017 at 19:12

1

Solved

For flexibility, I'm loading data into dynamic-sized matrices (e.g. Eigen::MatrixXf) using the C++ library Eigen. I've written some functions which require mixed- or fixed-sized matrices as paramet...
Pericranium asked 6/6, 2017 at 17:54

2

Solved

I have an image processing algorithm which makes of matrices, I have my own matrix operation codes (Multiplication, Inverse...) with me. But the processor I use is ARM Cortex-A8 processor, which ha...
Conjunctive asked 15/7, 2010 at 15:23

1

Solved

I am trying to reproduce the second example on this page of the Eigen documentation, but cannot compile my minimal program. I am using Eigen 3.3~beta1-2. When running g++ with the following argume...
Alleged asked 3/5, 2017 at 1:31

0

I want to compile the following example based on Eigen's general eigenvalue solver (Eigen 3.3.3): #include <iostream> #include <Eigen/Eigenvalues> int main() { Eigen::Matrix4f A; A ...
Barbarize asked 9/4, 2017 at 12:7

3

Solved

I am really new with C++ but here is what I am trying to do. I have a 4 by 3 matrix: 100 109.523 119.096 100 89.7169 76.256 100 96.0822 103.246 100 101.084 85.0639 I want to take calculate the ...
Release asked 4/4, 2017 at 0:45

2

Solved

I need to multiply each matrix column by each vector element using Eigen C++ library. I tried colwise without success. Sample data: Eigen::Matrix3Xf A(3,2); //3x2 A << 1 2, 2 2, 3 5; Eig...
Focal asked 21/3, 2017 at 18:58

1

Solved

I'm writing some C++ components for my R package using RcppEigen and I'm having trouble using typedefs in this context. The following code won't compile: // [[Rcpp::depends(RcppEigen)]] #include &...
Orchard asked 19/3, 2017 at 9:27

1

Solved

Matrix linesP0 is 3xN. I want to subtract it from vector planeP0 which is 3x1. Is there any smarter and faster way to do this? Now I'm using a for loop. Sample code below: MatrixXf temp(linesP0....
Bobseine asked 15/3, 2017 at 13:22

1

Solved

What is the relation between tensorflow and Eigen, particularly regarding the tensor datastructures? There are some older quotations (e.g. here) which state that tensorflow is using Eigen extensiv...
Soubise asked 24/2, 2017 at 15:58

1

Solved

I'm trying to take ownership of the memory backing an Eigen::Matrix without copying the memory. The data() method retains ownership. The only way I've figured out how to do this is by swapping the ...
Freemasonry asked 21/2, 2017 at 21:20

3

Solved

I'm working in C++ with a sparse matrix in Eigen. I would like to read the data stored in a specific row and column index just like I would with a regular eigen matrix. std::vector<Eigen::Tripl...
Chamber asked 21/2, 2017 at 19:21

1

I'm aware of the alignment issue arising when using Eigen's types in conjunction with dynamic memory. Thus, I've decided to disable vectorization with Eigen::DontAlign in accord with this page, yet...
Enzymology asked 11/2, 2017 at 21:44

1

I am currently working on a project where we need to solve |Ax - b|^2. In this case, A is a very sparse matrix and A'A has at most 5 nonzero elements in each row. We are working with images and...
Platitudinous asked 8/2, 2017 at 14:48

0

I am surprised to find out that it's not possible to simply add an Eigen::DiagonalMatrix to an Eigen::SparseMatrix: #include <Eigen/Core> #include <Eigen/Sparse> int main() { Eigen::M...
Panic asked 3/2, 2017 at 16:30

3

I need a 3D matrix/array structure on my code, and right now I'm relying on Eigen for both my matrices and vectors. Right now I am creating a 3D structure using new: MatrixXd* cube= new MatrixXd...
Daile asked 13/6, 2013 at 22:24

1

Solved

The TensorFlow white paper mentions that Eigen is used. Are there public explanations for how Eigen was chosen, and are they motivation for using Eigen in TensorFlow C++ op kernels?
Memoried asked 7/1, 2017 at 6:3

3

I am having difficulty using a header-only library (Eigen) in my CMake project. When i take off all the portion related to Eigen library it compiles, but not sure how to build with (Eigen). Note th...
Sleigh asked 1/2, 2015 at 19:51

2

Solved

I want to find the maximum values and indices by row of a matrix. I based this on an example on the eigen website (example 7). #include <iostream> #include <Eigen/Dense> using namespa...
Fredericfrederica asked 11/7, 2012 at 10:24

4

Solved

Eigen is a c++ linear algebra library http://eigen.tuxfamily.org. It's easy to work with basic data types, like basic float arrays, and just copy it to device memory and pass the pointer to cuda k...
Bedad asked 22/5, 2014 at 9:0

© 2022 - 2024 — McMap. All rights reserved.