Skip to content
Snippets Groups Projects
Commit 258fb054 authored by Vincent Nivoliers's avatar Vincent Nivoliers
Browse files

fixed permutation in initial leftmost

parent c56b12ff
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,7 @@ size_t leftmost(const std::vector<vec>& points) { ...@@ -103,7 +103,7 @@ size_t leftmost(const std::vector<vec>& points) {
size_t min = 0 ; size_t min = 0 ;
//iterato on all the points //iterato on all the points
for(size_t i = 1; i < points.size(); ++i) { for(size_t i = 1; i < points.size(); ++i) {
if(points[i].x < points[min].x) { if(points[i].lexicoinf(points[min])) {
//update the leftmost //update the leftmost
min = i ; min = i ;
} }
......
...@@ -17,18 +17,16 @@ using MatRX = Eigen::Matrix<rational, Eigen::Dynamic, Eigen::Dynamic> ; ...@@ -17,18 +17,16 @@ using MatRX = Eigen::Matrix<rational, Eigen::Dynamic, Eigen::Dynamic> ;
using VecRX = Eigen::Matrix<rational, Eigen::Dynamic, 1> ; using VecRX = Eigen::Matrix<rational, Eigen::Dynamic, 1> ;
//fix problems when using intervals in Eigen //fix problems when using intervals in Eigen
namespace Eigen { namespace std {
namespace internal { template<typename X, typename S, typename P>
template<typename X, typename S, typename P> struct is_convertible<X,boost::numeric::interval<S,P> > {
struct is_convertible<X,boost::numeric::interval<S,P> > { enum { value = is_convertible<X,S>::value };
enum { value = is_convertible<X,S>::value }; };
};
template<typename S, typename P1, typename P2> template<typename S, typename P1, typename P2>
struct is_convertible<boost::numeric::interval<S,P1>,boost::numeric::interval<S,P2> > { struct is_convertible<boost::numeric::interval<S,P1>,boost::numeric::interval<S,P2> > {
enum { value = true }; enum { value = true };
}; };
}
} }
//{{{ command line //{{{ command line
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment