eigen Questions
3
Solved
This is a question that can be answered by non-Eigen user...
I want to use the Eigen API to initialize a constant matrix in a header file, but Eigen seems not providing a constructor to achieve th...
1
Solved
I have two vectorXd in my program and I like to concatenate them into one vector, so that the second one's values goes after the first one, I found this for matrix but it doesn't seem to work on Ve...
3
Solved
How to extract a block from a Eigen::SparseMatrix<double>. It seems there aren't the methods I used for the dense ones.
‘class Eigen::SparseMatrix<double>’ has no member named ‘topLeft...
Highness asked 26/10, 2012 at 21:2
0
As an example, suppose I want to write a function that checks whether each floating point number in a dense eigen object is normal, and returns 1.0 for the corresponding position if it is normal, o...
3
I have several feature vectors stored in a cv::Mat where, each row is a feature vector (several rows like this one here: [ x1 y1 x2 y2 x3 y3.... ]). I have to apply SVD on each feature vector and f...
1
Solved
How do I compute the absolute value of a vector in Eigen? Since the obvious way
Eigen::VectorXf v(-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0);
v.abs(); // Compute abs value.
does not work.
Tremolant asked 16/8, 2014 at 14:9
2
Solved
I have the following class:
class Foo
{
public:
Foo(double a, double b, double c, double d, double e)
// This does not work:
// : m_bar(a, b, c, d, e)
{
m_bar << a, b, c, d, e;
}
priv...
Stoll asked 6/8, 2014 at 11:35
1
Solved
I have a bunch of data in Eigen::Vector2f variables. I want to print it in columns, but I end up with uneven results like so:
Vec1 |Vec2 |Vec3
1.94609 -0.0863508 | 1.71155 -0.137481 |3.00915
1.9...
Bunkhouse asked 21/7, 2014 at 23:33
2
Solved
Edit: The huge difference in performance is due to a bug in the test, when set up properly Eigen is 2 to 3 times faster.
I noticed that sparse matrix multiplication using C++ Eigen library is much...
1
Solved
I need to use the underlying arrays of several eigen matrices that could be RowMajor or ColumnMajor.
Is there any way to check which of the formats is used? (besides comparing the first column, wi...
3
Solved
I am new to C++ programming (using Rcpp for seamless integration into R), and I would appreciate some advice on how to speed up some calculations.
Consider the following example:
testmat <- ...
1
I'm doing some calculations in C++ with help of Eigen Library, the function is like this:
MatrixXd Cov(MatrixXd Data)
{
VectorXd meanVector;
...
return Covariance;
}
..in the wrap python fun...
Rangy asked 22/3, 2013 at 15:2
2
Is it possible to mask an array in Eigen as in Matlab?
Something like
ArrayXd arrayA = ArrayXd::Random(10, 5);
ArrayXi mask = ArrayXi::Zero(arrayA.rows(), arrayA.cols());
mask = arrayA > 5;
...
1
Suppose I have an array filled with doubles:
Eigen::Array<double,m,n> myarray;
Now I want to replace any elements of myarray which are not finite with the number 0.0 How would I do this?
...
1
Solved
I have some Eigen Matrices whose dimensions I don't know in advance, I only have an upper bound. I have a loop in which I fill those matrices (I initialize them using the upper bound) column by col...
1
Solved
There was no quick find answer that I could see on stack for this problem so I thought I would add one.
Say I have the following example code from the c++ Eigen Library:
Eigen::Matrix4d m1;
Eige...
1
Solved
I came across the following assigning for a matrix in Eigen Library here
Matrix3f m;
m << 1, 2, 3,
4, 5, 6,
7, 8, 9;
as an alternative way of the boring one (m(0,0) = 1; ... etc). My que...
Dodson asked 24/5, 2014 at 5:44
2
Solved
I've noticed a significant performance difference regarding Cholesky decomposition using the Eigen library.
I'm using the latest version of Eigen (3.2.1) with the following benchmark code:
#inclu...
Burner asked 7/5, 2014 at 16:45
1
Solved
I have two questions.
Does the rigid transformation represented in Eigen::Affine3f and Eigen::Matrix4f will be the same ?
How can we convert from Eigen::Affine3f to Eigen::Matrix4f and vice vers...
1
Solved
kind of strange:
I'm trying to set a full row of a matrix to 0 and neither of the four obvious constructs in eigen would compile:
//U is a p by p matrix. I wanna set its last column to 0.0f
U=sol...
4
Solved
I want to copy the rows 0, 2 and 4 of my matrix A into B, in this order.
Let A = [a0, a1, a2, a3, a4]^T , with a_i being row-vectors,
then B should be: [a0, a2, a4]^T.
The code below does what I...
2
Solved
When compiling OpenCV from source, there's the CMake option WITH_EIGEN, which says "Include Eigen3 support". However, nowhere in the documentation (or with google, for that matter) I can find out w...
2
Solved
Some of my Eigen C++ methods need to be callable from plain C++, therefore I want to provide overloaded functions that accept c arrays and map them to ArrayXd using Eigen::Map.
The code I currentl...
4
Solved
I have a key algorithm in which most of its runtime is spent on calculating a dense matrix product:
A*A'*Y, where: A is an m-by-n matrix,
A' is its conjugate transpose,
Y is an m-by-k matrix
T...
Strigose asked 27/2, 2014 at 15:38
3
Solved
I am trying to see the contents of an Eigen vector in the Locals and Expressions window of the QtCreator:
I see that it is a vector with 10 components:
but when I click it open I get:
I tr...
© 2022 - 2024 — McMap. All rights reserved.