Questions tagged [eigen3]

Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.

Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms. Homepage: http://eigen.tuxfamily.org

Please use eigen3 tag specifically for questions related to version 3 of the library.

1014 questions
3
votes
1 answer

C++ Eigen: recursive functions accepting any matrix class

I want to have a recursive function template void f(Eigen::MatrixBase& m) { size_t blockRows = ... size_t blockCols = ... .... f(m.block(0, 0, blockRows, blockCols)); } This unfortunately results in an…
Sogartar
  • 2,035
  • 2
  • 19
  • 35
3
votes
1 answer

Compile errors of Eigen's unsupported/CXX11/Tensor module

My project uses Eigen-3.3-beta. I can build my project in visual studio 2015 community which includes . But after I include , I got strange compile errors like these: 1>C:\Program Files (x86)\Windows…
stanleyerror
  • 728
  • 1
  • 9
  • 23
3
votes
1 answer

Setting decomposition threshold (tolerance) Eigen::JacobiSVD

I am trying to experiment with JacobiSVD of Eigen. In particular I am trying to reconstruct the input matrix from its singular value decomposition. http://eigen.tuxfamily.org/dox/classEigen_1_1JacobiSVD.html. Eigen::MatrixXf m =…
mkuse
  • 2,250
  • 4
  • 32
  • 61
3
votes
2 answers

sparse sparse product A^T*A optim in Eigen lib

In the case of multiple of same matrix matA, like matA.transpose()*matA, You don't have to compute all result product, because the result matrix is symmetric(so only if the m>n), in my specific case is always symmetric! square. So its enough the…
user2165656
  • 445
  • 1
  • 3
  • 11
3
votes
1 answer

Eigenvalues of sparse matrix using Eigen3

Is there a distinct and effective way of finding eigenvalues and eigenvectors of a real, symmetrical, very large, let's say 10000x10000, sparse matrix in Eigen3? There is an eigenvalue solver for dense matrices but that doesn't make use of the…
Philipp
  • 159
  • 1
  • 9
3
votes
1 answer

Eigen3 Matrix Random

i want to use the Eigen3 library with the random number generator Mersenne Twister, is there a simple way to extend eigen (simple) ? I cannot find in the documentation of eigen what random number generator they are using and if its thread safe?
Roby
  • 2,011
  • 4
  • 28
  • 55
3
votes
1 answer

Eigen's Conjugate Gradient vs SimplicialLLT for Poisson Equation

I am using finite differences for a square 100x100 domain (with neumann bcs on all sides) in c++ using Eigen's sparse matrix functionality, and built in solvers to compute x in Ax=b. I have tried the following solvers, but am getting very different…
ben18785
  • 356
  • 1
  • 5
  • 15
3
votes
1 answer

CMake does not find the source directory (installing Eigen)

I was installing the library Eigen on Ubuntu. I followed the instructions by creating a "build directory" alongside the downloaded source directory. That is, I have two directories: eigen-eigen-1306d75b4a21 for source, and an empty eigen-build for…
klkh
  • 265
  • 1
  • 2
  • 11
3
votes
1 answer

Eigen::Vector3f alignment

I'm using Eigen to process an unstructured point set (point cloud), represented as an array of Eigen::Vector3f objects. In order to enable SIMD vectorization I've subclassed Vector3f into a class with alignas(16). The objects in the array each start…
tmlen
  • 8,533
  • 5
  • 31
  • 84
3
votes
0 answers

Inspect the Eigen matrix value in visual studio 2012

I'm currently using Visual Studio 2012. I knew that in order to visualize the matrix entries from the Eigen3 library I have to do something as described here. However when I tried the both methods described there and it is still not possible to show…
3
votes
1 answer

workaround for Eigen::Matrix to release data

I want to use Eigen3 on data coming from another library. An earlier answer by ggael indicates a way for Eigen::Matrix to adopt preexsisting data with the new keyword. However, this is not sufficient for me, because the resulting Matrix still seems…
HyperBoar
  • 113
  • 9
3
votes
1 answer

What are the pros/cons of Eigen::Ref<> vs. std::reference_wrapper<>?

It appears that Eigen::Ref<>, introduced in Eigen 3.2, and std::reference_wrapper<> introduced in C++11 accomplish very similar goals. Obviously, the Eigen::Ref<> does not introduce a C++11 dependency, as std::reference_wrapper<> does, but what else…
arr_sea
  • 841
  • 10
  • 16
3
votes
1 answer

Inplace LDLT decomposition with Eigen

I'm doing some linear algebra with very large symmetric matrices (~800mb), and I'm trying out several different decompositions. Currently, I'm implementing LDLT and I'd like to take advantage of this to halve my memory requirements by overwriting…
sourtin
  • 347
  • 3
  • 9
3
votes
2 answers

What is the maximum size of matrix in Eigen?

In my case (64bit ubuntu with 16GB memory, using Eigen3), I write MatrixXd m(M,M); where M = 100,000, while running, the program crashed, and reported: what(): std::bad_alloc Aborted (core dumped) Using a dynamic 2 dim array, the program…
chentingpc
  • 1,283
  • 3
  • 18
  • 24
2
votes
1 answer

Ambiguous call with Eigen types

Attempting to make a class that takes both a Eigen::Matrix3d and Eigen::Vector4d as constructor args and have run into an issue with ambiguity. Given the following test class, class MyClass { public: MyClass(const Eigen::Matrix3d& m) { …
jlack
  • 305
  • 2
  • 13