[eigen] min(Arr1,Arr2) is it supposed to work? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
Hi,
is the following assumed to work (I saw it in the Quick Reference
Guide)
#include <Eigen/Core>
#include <cmath>
given
Eigen::Array3f V1, V2, V3;
V1 << 1,2,3;
V2 << 2,1,5;
V3= V1.min(V2); // this works
V3= std::pow(V1,2); // this works, as well
V3= std::min(V1,V2); // but this fails, see below
cout << V3 << endl;
}
Tmin.C:14:21: instantiated from here
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/include/g++-v4/bits/
stl_algobase.h:191:7: error: could not convert '((const
Eigen::ArrayBase<Eigen::Array<float, 3, 1> >*)((const
Eigen::Array<float, 3, 1>*)__b))->Eigen::ArrayBase<Derived>::operator<
[with OtherDerived = Eigen::Array<float, 3, 1>, Derived =
Eigen::Array<float, 3, 1>, typename Eigen::internal::traits<T>::Scalar
= float](((const Eigen::ArrayBase<Eigen::Array<float, 3, 1> >&)((const
Eigen::ArrayBase<Eigen::Array<float, 3, 1> >*)((const
Eigen::Array<float, 3, 1>*)__a))))' to 'bool'
Thanks for some info,
Helmut.