// Copyright (C) 2006 Fokko Beekhof // Email contact: Fokko.Beekhof@cui.unige.ch // The OMPTL library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA namespace omptl { template ForwardIterator adjacent_find(ForwardIterator first, ForwardIterator last, const unsigned P) { return ::std::adjacent_find(first, last); } template ForwardIterator adjacent_find(ForwardIterator first, ForwardIterator last, BinaryPredicate binary_pred, const unsigned P) { return ::std::adjacent_find(first, last, binary_pred); } template bool binary_search(ForwardIterator first, ForwardIterator last, const T& value, StrictWeakOrdering comp, const unsigned P) { return ::std::binary_search(first, last, value, comp); } template bool binary_search(ForwardIterator first, ForwardIterator last, const T& value, const unsigned P) { return ::std::binary_search(first, last, value); } template OutputIterator copy(InputIterator first, InputIterator last, OutputIterator result, const unsigned P) { return ::std::copy(first, last, result); } template BidirectionalIterator2 copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last, BidirectionalIterator2 result, const unsigned P) { return ::std::copy_backward(first, last, result); } template typename ::std::iterator_traits::difference_type count(InputIterator first, InputIterator last, const EqualityComparable& value, const unsigned P) { return ::std::count(first, last, value); } template void count(InputIterator first, InputIterator last, const EqualityComparable& value, Size& n, const unsigned P) { return ::std::count_if(first, last, value, n); } template typename InputIterator::difference_type count_if(InputIterator first, InputIterator last, Predicate pred, const unsigned P) { return ::std::count_if(first, last, pred); } template void count_if(InputIterator first, InputIterator last, Predicate pred, Size& n, const unsigned P) { return ::std::count_if(first, last, pred, n); } template bool equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryPredicate binary_pred, const unsigned P) { return ::std::equal(first1, last1, first2, binary_pred); } template bool equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, const unsigned P) { return ::std::equal(first1, last1, first2); } template ::std::pair equal_range(ForwardIterator first, ForwardIterator last, const T& value, StrictWeakOrdering comp, const unsigned P) { return ::std::equal_range(first, last, value, comp); } template ::std::pair equal_range(ForwardIterator first, ForwardIterator last, const T& value, const unsigned P) { return ::std::equal_range(first, last, value); } template void fill(ForwardIterator first, ForwardIterator last, const T& value, const unsigned P) { ::std::fill(first, last, value); } template OutputIterator fill_n(OutputIterator first, Size n, const T& value, const unsigned P) { return ::std::fill_n(first, n, value); } template InputIterator find(InputIterator first, InputIterator last, const EqualityComparable& value, const unsigned P) { return ::std::find(first, last, value); } template InputIterator find_if(InputIterator first, InputIterator last, Predicate pred, const unsigned P) { return ::std::find_if(first, last, pred); } template ForwardIterator1 find_end(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate comp, const unsigned P) { return ::std::find_end(first1, last1, first2, last2, comp); } template ForwardIterator1 find_end(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, const unsigned P) { return ::std::find_end(first1, last1, first2, last2); } template InputIterator find_first_of(InputIterator first1, InputIterator last1, ForwardIterator first2, ForwardIterator last2, BinaryPredicate comp, const unsigned P) { return ::std::find_first_of(first1, last1, first2, last2, comp); } template InputIterator find_first_of(InputIterator first1, InputIterator last1, ForwardIterator first2, ForwardIterator last2, const unsigned P) { return ::std::find_first_of(first1, last1, first2, last2); } template UnaryFunction for_each(InputIterator first, InputIterator last, UnaryFunction f, const unsigned P) { return ::std::for_each(first, last, f); } template void generate(ForwardIterator first, ForwardIterator last, Generator gen) { ::std::generate(first, last, gen); } template void par_generate(ForwardIterator first, ForwardIterator last, Generator gen, const unsigned P) { ::std::generate(first, last, gen); } template void push_heap(RandomAccessIterator first, RandomAccessIterator last, StrictWeakOrdering comp, const unsigned P) { ::std::push_heap(first, last, comp); } template void push_heap(RandomAccessIterator first, RandomAccessIterator last, const unsigned P) { ::std::push_heap(first, last); } template void pop_heap(RandomAccessIterator first, RandomAccessIterator last, StrictWeakOrdering comp, const unsigned P) { ::std::pop_heap(first, last, comp); } template void pop_heap(RandomAccessIterator first, RandomAccessIterator last, const unsigned P) { ::std::pop_heap(first, last); } template void make_heap(RandomAccessIterator first, RandomAccessIterator last, StrictWeakOrdering comp, const unsigned P) { ::std::make_heap(first, last, comp); } template void make_heap(RandomAccessIterator first, RandomAccessIterator last, const unsigned P) { ::std::make_heap(first, last); } template void sort_heap(RandomAccessIterator first, RandomAccessIterator last, StrictWeakOrdering comp, const unsigned P) { ::std::sort_heap(first, last, comp); } template void sort_heap(RandomAccessIterator first, RandomAccessIterator last, const unsigned P) { ::std::sort_heap(first, last); } template bool includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, StrictWeakOrdering comp, const unsigned P) { return ::std::includes(first1, last1, first2, last2, comp); } template bool includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, const unsigned P) { return ::std::includes(first1, last1, first2, last2); } template bool lexicographical_compare(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, BinaryPredicate comp, const unsigned P) { return ::std::lexicographical_compare(first1, last1, first2, last2, comp); } template bool lexicographical_compare(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, const unsigned P) { return ::std::lexicographical_compare(first1, last1, first2, last2); } template ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, const T& value, StrictWeakOrdering comp, const unsigned P) { return ::std::lower_bound(first, last, value, comp); } template ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, const T& value, const unsigned P) { return ::std::lower_bound(first, last, value); } template OutputIterator merge(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, StrictWeakOrdering comp, const unsigned P) { return ::std::mismatch(first1, last1, first2, last2, result, comp); } template OutputIterator merge(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, const unsigned P) { return ::std::mismatch(first1, last1, first2, last2, result); } template ForwardIterator min_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp, const unsigned P) { return ::std::min_element(first, last, comp); } template ForwardIterator min_element(ForwardIterator first, ForwardIterator last, const unsigned P) { return ::std::min_element(first, last); } template ForwardIterator max_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp, const unsigned P) { return ::std::max_element(first, last, comp); } template ForwardIterator max_element(ForwardIterator first, ForwardIterator last, const unsigned P) { return ::std::max_element(first, last); } template ::std::pair mismatch(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryPredicate binary_pred, const unsigned P) { return ::std::mismatch(first1, last1, first2, binary_pred); } template ::std::pair mismatch(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, const unsigned P) { return ::std::mismatch(first1, last1, first2); } template void nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last, StrictWeakOrdering comp, const unsigned P) { return ::std::nth_element(first, nth, last, comp); } template void nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last, const unsigned P) { return ::std::nth_element(first, nth, last); } template void partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last, StrictWeakOrdering comp, const unsigned P) { return ::std::partial_sort(first, middle, last, comp); } template void partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last, const unsigned P) { return ::std::partial_sort(first, middle, last); } template RandomAccessIterator partial_sort_copy(InputIterator first, InputIterator last, RandomAccessIterator result_first, RandomAccessIterator result_last, StrictWeakOrdering comp, const unsigned P) { return ::std::partial_sort_copy(first, last, result_first, result_last, comp); } template RandomAccessIterator partial_sort_copy(InputIterator first, InputIterator last, RandomAccessIterator result_first, RandomAccessIterator result_last, const unsigned P) { return ::std::partial_sort_copy(first, last, result_first, result_last); } template ForwardIterator partition(ForwardIterator first, ForwardIterator last, Predicate pred, const unsigned P) { return ::std::partition(first, last, pred); } template bool next_permutation(BidirectionalIterator first, BidirectionalIterator last, StrictWeakOrdering comp, const unsigned P) { return ::std::next_permutation(first, last, comp); } template bool next_permutation(BidirectionalIterator first, BidirectionalIterator last, const unsigned P) { return ::std::next_permutation(first, last); } template bool prev_permutation(BidirectionalIterator first, BidirectionalIterator last, StrictWeakOrdering comp, const unsigned P) { return ::std::prev_permutation(first, last, comp); } template bool prev_permutation(BidirectionalIterator first, BidirectionalIterator last, const unsigned P) { return ::std::prev_permutation(first, last); } template ForwardIterator stable_partition(ForwardIterator first, ForwardIterator last, Predicate pred, const unsigned P) { return ::std::stable_partition(first, last, pred); } template void random_shuffle(RandomAccessIterator first, RandomAccessIterator last, const unsigned P) { return ::std::random_shuffle(first, last); } template void random_shuffle(RandomAccessIterator first, RandomAccessIterator last, RandomNumberGenerator &rgen, const unsigned P) { return ::std::random_shuffle(first, last, rgen); } template ForwardIterator remove(ForwardIterator first, ForwardIterator last, const T& value, const unsigned P) { return ::std::remove(first, last, value); } template ForwardIterator remove_if(ForwardIterator first, ForwardIterator last, Predicate pred, const unsigned P) { return ::std::remove_if(first, last, pred); } template OutputIterator remove_copy(InputIterator first, InputIterator last, OutputIterator result, const T& value, const unsigned P) { return ::std::remove_copy(first, last, result, value); } template OutputIterator remove_copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred, const unsigned P) { return ::std::remove_copy_if(first, last, result, pred); } template void replace(ForwardIterator first, ForwardIterator last, const T& old_value, const T& new_value, const unsigned P) { return ::std::replace(first, last, old_value, new_value); } template OutputIterator replace_copy(InputIterator first, InputIterator last, OutputIterator result, const T& old_value, const T& new_value, const unsigned P) { return ::std::replace_copy(first, last, result, old_value, new_value); } template OutputIterator replace_copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred, const T& new_value, const unsigned P) { return ::std::replace_copy_if(first, last, result, pred, new_value); } template void replace_if(ForwardIterator first, ForwardIterator last, Predicate pred, const T& new_value, const unsigned P) { return ::std::replace_if(first, last, pred, new_value); } template void reverse(BidirectionalIterator first, BidirectionalIterator last, const unsigned P) { return ::std::reverse(first, last); } template OutputIterator reverse_copy(BidirectionalIterator first, BidirectionalIterator last, OutputIterator result, const unsigned P) { return ::std::reverse_copy(first, last, result); } template ForwardIterator rotate( ForwardIterator first, ForwardIterator middle, ForwardIterator last, const unsigned P) { return ::std::rotate(first, middle, last); } template OutputIterator rotate_copy(ForwardIterator first, ForwardIterator middle, ForwardIterator last, OutputIterator result, const unsigned P) { return ::std::rotate_copy(first, middle, last, result); } template ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate binary_pred, const unsigned P) { return ::std::search(first1, last1, first2, last2, binary_pred); } template ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, const unsigned P) { return ::std::search(first1, last1, first2, last2); } template ForwardIterator search_n(ForwardIterator first, ForwardIterator last, Integer count, const T& value, BinaryPredicate binary_pred, const unsigned P) { return ::std::search_n(first, last, count, value, binary_pred); } template ForwardIterator search_n(ForwardIterator first, ForwardIterator last, Integer count, const T& value, const unsigned P) { return ::std::search_n(first, last, count, value); } template OutputIterator set_difference(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, StrictWeakOrdering comp, const unsigned P) { return ::std::set_difference(first1, last1, first2, last2, result,comp); } template OutputIterator set_difference(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, const unsigned P) { return ::std::set_difference(first1, last1, first2, last2, result); } template OutputIterator set_intersection(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, StrictWeakOrdering comp, const unsigned P) { return ::std::set_intersection(first1, last1, first2, last2, result, comp); } template OutputIterator set_intersection(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, const unsigned P) { return ::std::set_intersection(first1, last1, first2, last2, result); } template OutputIterator set_symmetric_difference(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, StrictWeakOrdering comp, const unsigned P) { return ::std::set_symmetric_difference(first1, last1, first2, last2, result, comp); } template OutputIterator set_symmetric_difference(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, const unsigned P) { return ::std::set_symmetric_difference(first1, last1, first2, last2, result); } template OutputIterator set_union(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, StrictWeakOrdering comp, const unsigned P) { return ::std::set_union(first1, last1, first2, last2, result, comp); } template OutputIterator set_union(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, const unsigned P) { return ::std::set_union(first1, last1, first2, last2, result); } template void stable_sort(RandomAccessIterator first, RandomAccessIterator last, const unsigned P) { return ::std::stable_sort(first, last); } template void stable_sort(RandomAccessIterator first, RandomAccessIterator last, StrictWeakOrdering comp, const unsigned P) { return ::std::stable_sort(first, last, comp); } template void sort(RandomAccessIterator first, RandomAccessIterator last, const unsigned P) { return ::std::sort(first, last); } template void sort(RandomAccessIterator first, RandomAccessIterator last, StrictWeakOrdering comp, const unsigned P) { return ::std::sort(first, last, comp); } template ForwardIterator2 swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, const unsigned P) { return ::std::swap_ranges(first1, last1, first2); } template OutputIterator transform(InputIterator first, InputIterator last, OutputIterator result, UnaryFunction op, const unsigned P) { return ::std::transform(first, last, result, op); } template OutputIterator transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, BinaryFunction binary_op, const unsigned P) { return ::std::transform(first1, last1, first2, result, binary_op); } template ForwardIterator unique(ForwardIterator first, ForwardIterator last, BinaryPredicate binary_pred, const unsigned P) { return ::std::unique(first, last, binary_pred); } template ForwardIterator unique(ForwardIterator first, ForwardIterator last, const unsigned P) { return ::std::unique(first, last); } template OutputIterator unique_copy(InputIterator first, InputIterator last, OutputIterator result, BinaryPredicate binary_pred, const unsigned P) { return ::std::unique_copy(first, last, result, binary_pred); } template OutputIterator unique_copy(InputIterator first, InputIterator last, OutputIterator result, const unsigned P) { return ::std::unique_copy(first, last, result); } template ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last, const T& value, StrictWeakOrdering comp, const unsigned P) { return ::std::upper_bound(first, last, value, comp); } template ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last, const T& value, const unsigned P) { return ::std::upper_bound(first, last, value); } } // namespace omptl