Hi Friends,
I am dealing with <Eigen> library.
I can cout<<(PointsSorted.col(0).array()<0)<<endl;
The output is:
1 1 1 1 1 0 0 0 0 0
But how can I assign this output to a std::vector. I have a slow solution to do this by a pointer.I am wondering if there is a faster way like:
vector<int> v;
v.push_back((PointsSorted.col(0).array()<0));
But it does not work by this way. What's the problem? Anyone knows the type of (PointsSorted.col(0).array()<0)?
L
Last edited on
What is the type of PointsSorted? What is the type returned by its method col()?
My wild guess is that array() returns some array-type and that there is
operator< ( array-type &, number-type )
Furthermore, the return type of that operator is again some array-type, which has operator<< (ostream&, array-type).
You have the Eigen library. Therefore, you have its documentation or at least header files. What do they reveal?
I have tried, but felt hard to read their documentations.
I found Eigen has its own forum. I posted my question to their site now.
Thanks for the intention to help,
L