16 #ifndef ATHCONTAINERS_TOOLS_DVL_ALGORITHMS_H
17 #define ATHCONTAINERS_TOOLS_DVL_ALGORITHMS_H
47 template <
class DVL,
class T>
54 return DataModel_detail::dvl_remove (
beg,
end,
value);
68 template <
class DVL,
class Predicate>
75 return DataModel_detail::dvl_remove_if (
beg,
end, pred);
90 template <
class DVL,
class T>
91 typename std::reverse_iterator<DataModel_detail::iterator<DVL> >
97 return DataModel_detail::dvl_remove (
beg,
end,
value);
112 template <
class DVL,
class Predicate>
113 typename std::reverse_iterator<DataModel_detail::iterator<DVL> >
119 return DataModel_detail::dvl_remove_if (
beg,
end, pred);
139 return DataModel_detail::dvl_unique (
beg,
end);
153 template <
class DVL,
class BinaryPredicate>
157 BinaryPredicate pred)
160 return DataModel_detail::dvl_unique (
beg,
end, pred);
176 typename std::reverse_iterator<DataModel_detail::iterator<DVL> >
181 return DataModel_detail::dvl_unique (
beg,
end);
197 template <
class DVL,
class BinaryPredicate>
198 typename std::reverse_iterator<DataModel_detail::iterator<DVL> >
201 BinaryPredicate pred)
204 return DataModel_detail::dvl_unique (
beg,
end, pred);
226 DataModel_detail::resortAux (
beg,
end);
248 typedef typename DVL::BaseContainer::reverse_iterator ri;
250 ri(mid.base().base()),
251 ri(
end.base().base()));
252 DataModel_detail::resortAux (
beg,
end);
284 DataModel_detail::resortAux (
beg,
end);
304 typedef typename DVL::BaseContainer::reverse_iterator ri;
306 DataModel_detail::resortAux (
beg,
end);
322 template <
class DVL,
class Predicate>
330 DataModel_detail::Predwrapper<DVL, Predicate> (pred)),
332 DataModel_detail::resortAux (
beg,
end);
349 template <
class DVL,
class Predicate>
350 typename std::reverse_iterator<DataModel_detail::iterator<DVL> >
356 typedef typename DVL::BaseContainer::reverse_iterator ri;
357 typedef typename DataModel_detail::Predwrapper<DVL, Predicate> pwrap_t;
358 std::reverse_iterator<Iterator> ret
360 ri(
end.base().base()),
361 pwrap_t (pred)).
base(),
362 beg.base().container()));
363 DataModel_detail::resortAux (
beg,
end);
380 template <
class DVL,
class Predicate>
388 DataModel_detail::Predwrapper<DVL, Predicate>
391 DataModel_detail::resortAux (
beg,
end);
408 template <
class DVL,
class Predicate>
409 typename std::reverse_iterator<DataModel_detail::iterator<DVL> >
416 typedef typename DVL::BaseContainer::reverse_iterator ri;
417 typedef typename DataModel_detail::Predwrapper<DVL, Predicate> pwrap_t;
418 std::reverse_iterator<Iterator> ret
420 ri(
end.base().base()),
421 pwrap_t (pred)).
base(),
422 beg.base().container()));
423 DataModel_detail::resortAux (
beg,
end);
447 DataModel_detail::resortAux (
beg,
end);
464 template <
class DVL,
class Compare>
472 typename DataModel_detail::Compwrapper<DVL, Compare>(
comp));
473 DataModel_detail::resortAux (
beg,
end);
495 typedef typename DVL::BaseContainer::reverse_iterator ri;
497 ri (mid.base().base()),
498 ri (
end.base().base()));
499 DataModel_detail::resortAux (
beg,
end);
516 template <
class DVL,
class Compare>
523 typedef typename DVL::BaseContainer::reverse_iterator ri;
525 ri (mid.base().base()),
526 ri (
end.base().base()),
527 typename DataModel_detail::Compwrapper<DVL, Compare>(
comp));
528 DataModel_detail::resortAux (
beg,
end);
559 typedef std::less<typename DVL::BaseContainer::value_type>
less;
561 typename DataModel_detail::Compwrapper<DVL, less> (
less()));
562 DataModel_detail::resortAux (
beg,
end);
576 template <
class DVL,
class Compare>
582 typename DataModel_detail::Compwrapper<DVL, Compare> (
comp));
583 DataModel_detail::resortAux (
beg,
end);
601 typedef typename DVL::BaseContainer::reverse_iterator ri;
604 typedef std::less<typename DVL::BaseContainer::value_type>
less;
606 typename DataModel_detail::Compwrapper<DVL, less> (
less()));
607 DataModel_detail::resortAux (
beg,
end);
622 template <
class DVL,
class Compare>
627 typedef typename DVL::BaseContainer::reverse_iterator ri;
629 typename DataModel_detail::Compwrapper<DVL, Compare> (
comp));
630 DataModel_detail::resortAux (
beg,
end);
649 typedef std::less<typename DVL::BaseContainer::value_type>
less;
651 DataModel_detail::Compwrapper<DVL, less> (
less()));
652 DataModel_detail::resortAux (
beg,
end);
665 template <
class DVL,
class Compare>
671 DataModel_detail::Compwrapper<DVL, Compare> (
comp));
672 DataModel_detail::resortAux (
beg,
end);
690 typedef typename DVL::BaseContainer::reverse_iterator ri;
693 typedef std::less<typename DVL::BaseContainer::value_type>
less;
695 typename DataModel_detail::Compwrapper<DVL, less> (
less()));
696 DataModel_detail::resortAux (
beg,
end);
710 template <
class DVL,
class Compare>
715 typedef typename DVL::BaseContainer::reverse_iterator ri;
717 typename DataModel_detail::Compwrapper<DVL, Compare>(
comp));
718 DataModel_detail::resortAux (
beg,
end);
740 typedef std::less<typename DVL::BaseContainer::value_type>
less;
742 DataModel_detail::Compwrapper<DVL, less> (
less()));
743 DataModel_detail::resortAux (
beg,
end);
758 template <
class DVL,
class Compare>
765 DataModel_detail::Compwrapper<DVL, Compare> (
comp));
766 DataModel_detail::resortAux (
beg,
end);
786 typedef typename DVL::BaseContainer::reverse_iterator ri;
789 typedef std::less<typename DVL::BaseContainer::value_type>
less;
791 ri (mid.base().base()),
792 ri (
end.base().base()),
793 typename DataModel_detail::Compwrapper<DVL, less>
795 DataModel_detail::resortAux (
beg,
end);
810 template <
class DVL,
class Compare>
816 typedef typename DVL::BaseContainer::reverse_iterator ri;
818 ri (mid.base().base()),
819 ri (
end.base().base()),
820 typename DataModel_detail::Compwrapper<DVL, Compare>
822 DataModel_detail::resortAux (
beg,
end);
838 template <
class DVL,
class UniformRandom>
844 DataModel_detail::resortAux (
beg,
end);
860 template <
class DVL,
class UniformRandom>
867 typedef typename DVL::BaseContainer::reverse_iterator ri;
869 ri(
end.base().base()),
871 DataModel_detail::resortAux (
beg,
end);
879 #endif // not ATHCONTAINERS_TOOLS_DVL_ALGORITHMS_H