bool compare(Range1 const& x, Range2 const& y) { collide_list a(x.begin(), x.end()); collide_list b(y.begin(), y.end()); a.sort(); b.sort(); return a == b; }
bool range_compare( Range1 const &r1, Range2 const &r2, T const &epsilon) { typename Range1::const_iterator i1 = r1.begin(); typename Range2::const_iterator i2 = r2.begin(); for(; i1 != r1.end(); ++i1,++i2) if (std::abs(*i1 - *i2) > epsilon) // FIXME: use math::diff! return false; return true; }
inline void append( Range1& destination, Range2& source ) { destination.insert( destination.end(), source.begin(), source.end() ); }