We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在eigen_types.h文件中,编译时下面这段代码有警告,我就进去看了一下
eigen_types.h
template <> inline bool less_vec<3>::operator()( const Eigen::Matrix<int, 3, 1>& v1, const Eigen::Matrix<int, 3, 1>& v2 ) const { return v1[ 0 ] < v2[ 0 ] || ( v1[ 0 ] == v2[ 0 ] && v1[ 1 ] < v2[ 1 ] ) && ( v1[ 0 ] == v2[ 0 ] && v1[ 1 ] == v2[ 1 ] && v1[ 2 ] < v2[ 2 ] ); }
按照前半段判断的逻辑推断,先比较两个向量的第1个元素,如果第1个元素相同,再对比第2个元素。按这种逻辑,后面应该是:如果第1和第2个元素都相同,则对比第3个元素吧? 是不是其实下面这样修改才是对的?
template <> inline bool less_vec<3>::operator()( const Eigen::Matrix<int, 3, 1>& v1, const Eigen::Matrix<int, 3, 1>& v2 ) const { return v1[ 0 ] < v2[ 0 ] || ( v1[ 0 ] == v2[ 0 ] && v1[ 1 ] < v2[ 1 ] ) || ( v1[ 0 ] == v2[ 0 ] && v1[ 1 ] == v2[ 1 ] && v1[ 2 ] < v2[ 2 ] ); }
The text was updated successfully, but these errors were encountered:
还是说,如果第1个元素不符合,需要后面两个元素同时满足条件才为真?
Sorry, something went wrong.
这里应该是高博笔误了,按理解以及高博自动驾驶的书里这三个运算最终结果都是或运算
No branches or pull requests
在
eigen_types.h
文件中,编译时下面这段代码有警告,我就进去看了一下按照前半段判断的逻辑推断,先比较两个向量的第1个元素,如果第1个元素相同,再对比第2个元素。按这种逻辑,后面应该是:如果第1和第2个元素都相同,则对比第3个元素吧?
是不是其实下面这样修改才是对的?
The text was updated successfully, but these errors were encountered: