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
0
votes
3 answers

CMake: Eigen3 include dirs needed from a third project

I've implemented a library which uses Eigen3. The following lines are part of the CMake of this library: #EIGEN find_package(Eigen3 REQUIRED) include_directories(${EIGEN3_INCLUDE_DIR}) And Eigen3 is found and my library compiles without any…
jotaraul
  • 21
  • 4
0
votes
1 answer

Eigen3: Passing fixed size matrix and dynamic size matrix in one data type in template function

I have further question continuing my previous question. Now I want to pass two kinds of Eigen parameters in one type: (1) fixed sized matrix or (2) rows is fixed but cols is dynamic. Both matrices's rows always should be 3. Thy modified function…
Jeongseok Lee
  • 60
  • 1
  • 10
0
votes
1 answer

Install Eigen3 for Xcode5

I hope I dont get downvoted, but I have search online and the Eigen wiki and I cant find instructions on how to install Eigen3 to use it on Xcode5. I downloaded the tar file and untar it, but then I dont know where to go.
heri-salmas
  • 103
  • 2
  • 12
0
votes
1 answer

no rule to make target. whats this?

No rule to make target /usr/include/eigen3/Eigen/src/Core/../Plugins/CommonCwiseUnaryOps.h', needed by block_grasp_generator-hydro-devel/CMakeFiles/block_grasp_generator_visualization_tools.dir/src/visualization_tools.cpp.o'. Stop. the file…
0
votes
1 answer

use .block() with complex matrix eigen lib

when i would like to use block() with MatrixXcd In and levyhorni: levyhorni=In.block(0,0,h/2,w/2); is correct or for every part of complex is correct? levyhorni.real()=In.real().block(0,0,h/2,w/2); and same for .imag();
0
votes
0 answers

Segmentation Fault at Eigen Sparse-Matrix Multiplication

I have a problem when calculating the product of two sparse matrices. Here ist the program: void RandomWalk::calculateAx(const SpMat &x, const SpMat &adj_mat1, const SpMat &adj_mat2, const double &lambda, SpMat &result) { SpMat…
alex
  • 84
  • 7
0
votes
0 answers

Eigen3 arrays' logical operations

I'm trying to apply a component-wise logical and (&&) to the elements of two different arrays. The first one maps an already allocated buffer while the second one is created from scratch: Map
mUogoro
  • 63
  • 1
  • 5
0
votes
1 answer

Convert an Eigen3 Transform's rotation into an AngleAxis

How can this be done using Eigen 3? #include Affine3d transform; AngleAxisd aa = ...;
Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
0
votes
0 answers

Multiplying one-dimensional arrays with matrices using Eigen

I was wondering why this doesn't work with Eigen: MatrixXd A = MatrixXd::Random(3, 10); Array x = Array::Random(10); MatrixXd y = x.matrix() * A.transpose(); while this works: MatrixXd A = MatrixXd::Random(3,…
Lucas
  • 738
  • 7
  • 19
0
votes
1 answer

Using Eigen C++ Library with Intel MKL

I tried to use Intel MKL from Eigen(3). I wrote a basic matrix multiplication program which is given below. #include #define EIGEN_USE_MKL_ALL #include "../Eigen/src/Core/util/MKL_support.h" #include "Dense" #include "EigenTools.h" …
Sooraj
  • 585
  • 1
  • 6
  • 12
0
votes
2 answers

Problems converting the following Matrix code in Matlab to Eigen in C++

H, W, R,V are matrices and are already initialized with respective sizes. "beta" is an int, "myeps" is a float. For the matrix implementation I have currently used Eigen library. However I'm not sure of the syntax to convert this Matlab code…
Miyuru Sagarage
  • 1,305
  • 1
  • 11
  • 15
0
votes
1 answer

Can I solve a system of linear equations in the form xA=b using Eigen, with A being sparse?

I need to convert my MATLAB code to C++, which include linear equations in the form xA=0. I know that Eigen can deal linear equations Ax=b. I am asking: is there a way to solve a system of linear equations xA=b, using Eigen for C++ (Visual Studio…
Judy
  • 11
  • 3
0
votes
1 answer

c++ passing non-templated eigen vector as function argument and modifying it in the function

I am implementing a function member of a derived class (declared as virtual in the base class). One of the arguments is a vectorXd and it is where the result of an operation will be stored. I read the "Writing Functions Taking Eigen Types as…
Kevin
  • 242
  • 2
  • 10
0
votes
1 answer

Head function in eigen3 produces wrong result

I want to get a subset of the vector s, the following code didn't give the right result. But if I write VectorXd e=s.head(svp) e is right. Why the following code is wrong? Thanks! Eigen::JacobiSVD svd(input,…
areslp
  • 383
  • 1
  • 4
  • 17
-1
votes
1 answer

Non integer indexes for Eigen3 (sparse) matrices

In a restricted sense, a matrix is a table of numbers. It has rows and columns that are generally numbered sequentially. So, we have the element (i,j). Of course, this is all in our heads!!! There are no real "columns" or "rows". In practice, the…
André Caldas
  • 128
  • 1
  • 7