mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-05-10 09:23:30 +00:00
不要ファイル削除
This commit is contained in:
parent
5e67195030
commit
fd1cfd05af
130 changed files with 0 additions and 6393 deletions
|
@ -1,50 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/algorithm/infit/copy.hpp>
|
||||
#include <sprout/algorithm/infit/copy_n.hpp>
|
||||
#include <sprout/algorithm/infit/copy_if.hpp>
|
||||
#include <sprout/algorithm/infit/copy_backward.hpp>
|
||||
#include <sprout/algorithm/infit/transform.hpp>
|
||||
#include <sprout/algorithm/infit/replace.hpp>
|
||||
#include <sprout/algorithm/infit/replace_if.hpp>
|
||||
#include <sprout/algorithm/infit/replace_copy.hpp>
|
||||
#include <sprout/algorithm/infit/replace_copy_if.hpp>
|
||||
#include <sprout/algorithm/infit/fill.hpp>
|
||||
#include <sprout/algorithm/infit/fill_n.hpp>
|
||||
#include <sprout/algorithm/infit/generate.hpp>
|
||||
#include <sprout/algorithm/infit/generate_n.hpp>
|
||||
#include <sprout/algorithm/infit/remove.hpp>
|
||||
#include <sprout/algorithm/infit/remove_if.hpp>
|
||||
#include <sprout/algorithm/infit/remove_copy.hpp>
|
||||
#include <sprout/algorithm/infit/remove_copy_if.hpp>
|
||||
#include <sprout/algorithm/infit/unique.hpp>
|
||||
#include <sprout/algorithm/infit/unique_copy.hpp>
|
||||
#include <sprout/algorithm/infit/reverse.hpp>
|
||||
#include <sprout/algorithm/infit/reverse_copy.hpp>
|
||||
#include <sprout/algorithm/infit/rotate.hpp>
|
||||
#include <sprout/algorithm/infit/rotate_copy.hpp>
|
||||
#include <sprout/algorithm/infit/partition.hpp>
|
||||
#include <sprout/algorithm/infit/partition_copy.hpp>
|
||||
#include <sprout/algorithm/infit/stable_partition.hpp>
|
||||
#include <sprout/algorithm/infit/stable_partition_copy.hpp>
|
||||
#include <sprout/algorithm/infit/sort.hpp>
|
||||
#include <sprout/algorithm/infit/stable_sort.hpp>
|
||||
#include <sprout/algorithm/infit/partial_sort.hpp>
|
||||
#include <sprout/algorithm/infit/nth_element.hpp>
|
||||
#include <sprout/algorithm/infit/merge.hpp>
|
||||
#include <sprout/algorithm/infit/inplace_merge.hpp>
|
||||
#include <sprout/algorithm/infit/set_union.hpp>
|
||||
#include <sprout/algorithm/infit/set_intersection.hpp>
|
||||
#include <sprout/algorithm/infit/set_difference.hpp>
|
||||
#include <sprout/algorithm/infit/set_symmetric_difference.hpp>
|
||||
#include <sprout/algorithm/infit/push_heap.hpp>
|
||||
#include <sprout/algorithm/infit/pop_heap.hpp>
|
||||
#include <sprout/algorithm/infit/make_heap.hpp>
|
||||
#include <sprout/algorithm/infit/make_partial_heap.hpp>
|
||||
#include <sprout/algorithm/infit/sort_heap.hpp>
|
||||
#include <sprout/algorithm/infit/swap_element.hpp>
|
||||
#include <sprout/algorithm/infit/swap_element_copy.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_HPP
|
|
@ -1,45 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::copy(first, last, result),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first, last), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// copy
|
||||
//
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::copy_impl(first, last, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_COPY_HPP
|
|
@ -1,45 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_COPY_BACKWARD_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_COPY_BACKWARD_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/copy_backward.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_backward_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::copy_backward(first, last, result),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first, last), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// copy_backward
|
||||
//
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_backward(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::copy_backward_impl(first, last, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_COPY_BACKWARD_HPP
|
|
@ -1,46 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_COPY_IF_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_COPY_IF_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/copy_if.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_if_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::copy_if(first, last, result, pred),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::count_if(first, last, pred), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// copy_if
|
||||
//
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_if(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::copy_if_impl(first, last, result, pred, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_COPY_IF_HPP
|
|
@ -1,44 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_COPY_N_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_COPY_N_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/copy_n.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Size, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_n_impl(
|
||||
Iterator first,
|
||||
Size n,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::copy_n(first, n, result),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(n, sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// copy_n
|
||||
//
|
||||
template<typename Iterator, typename Size, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_n(
|
||||
Iterator first,
|
||||
Size n,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::copy_n_impl(first, n, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_COPY_N_HPP
|
|
@ -1,41 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_FILL_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_FILL_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/fill.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> fill_impl(
|
||||
Container const& cont,
|
||||
T const& value,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::fill(cont, value),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// fill
|
||||
//
|
||||
template<typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> fill(
|
||||
Container const& cont,
|
||||
T const& value
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::fill_impl(cont, value, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_FILL_HPP
|
|
@ -1,44 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_FILL_N_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_FILL_N_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/fill_n.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Size, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> fill_n_impl(
|
||||
Container const& cont,
|
||||
Size n,
|
||||
T const& value,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::fill_n(cont, n, value),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(n, sprout::size(cont))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// fill_n
|
||||
//
|
||||
template<typename Container, typename Size, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> fill_n(
|
||||
Container const& cont,
|
||||
Size n,
|
||||
T const& value
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::fill_n_impl(cont, n, value, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_FILL_N_HPP
|
|
@ -1,43 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_GENERATE_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_GENERATE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/generate.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Generator, typename... Inits>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> generate_impl(
|
||||
Container const& cont,
|
||||
Generator gen,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset,
|
||||
Inits const&... inits
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::generate(cont, gen, inits...),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// generate
|
||||
//
|
||||
template<typename Container, typename Generator, typename... Inits>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> generate(
|
||||
Container const& cont,
|
||||
Generator gen,
|
||||
Inits const&... inits
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::generate_impl(cont, gen, sprout::fixed_begin_offset(cont), inits...);
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_GENERATE_HPP
|
|
@ -1,46 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_GENERATE_N_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_GENERATE_N_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/generate_n.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Size, typename Generator, typename... Inits>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> generate_n_impl(
|
||||
Container const& cont,
|
||||
Size n,
|
||||
Generator gen,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset,
|
||||
Inits const&... inits
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::generate_n(cont, n, gen, inits...),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(n, sprout::size(cont))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// generate_n
|
||||
//
|
||||
template<typename Container, typename Size, typename Generator, typename... Inits>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> generate_n(
|
||||
Container const& cont,
|
||||
Size n,
|
||||
Generator gen,
|
||||
Inits const&... inits
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::generate_n_impl(cont, n, gen, sprout::fixed_begin_offset(cont), inits...);
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_GENERATE_N_HPP
|
|
@ -1,70 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_INPLACE_MERGE_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_INPLACE_MERGE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/inplace_merge.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> inplace_merge_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::inplace_merge(cont, middle, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// inplace_merge
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> inplace_merge(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::inplace_merge_impl(cont, middle, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> inplace_merge_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::inplace_merge(cont, middle),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// inplace_merge
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> inplace_merge(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::inplace_merge_impl(cont, middle, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_INPLACE_MERGE_HPP
|
|
@ -1,66 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_MAKE_HEAP_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_MAKE_HEAP_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/make_heap.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_heap_impl(
|
||||
Container const& cont,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::make_heap(cont, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// make_heap
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_heap(
|
||||
Container const& cont,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::make_heap_impl(cont, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_heap_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::make_heap(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// make_heap
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_heap(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::make_heap_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_MAKE_HEAP_HPP
|
|
@ -1,71 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_MAKE_PARTIAL_HEAP_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_MAKE_PARTIAL_HEAP_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/make_partial_heap.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_partial_heap_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::make_partial_heap(cont, middle, comp),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::begin(cont), middle)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// make_partial_heap
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_partial_heap(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::make_partial_heap_impl(cont, middle, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_partial_heap_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::make_partial_heap(cont, middle),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::begin(cont), middle)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// make_partial_heap
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_partial_heap(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::make_partial_heap_impl(cont, middle, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_MAKE_PARTIAL_HEAP_HPP
|
|
@ -1,90 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_MERGE_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_MERGE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/merge.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> merge_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::merge(first1, last1, first2, last2, result, comp),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(
|
||||
NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first1, last1) + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first2, last2),
|
||||
sprout::size(result)
|
||||
)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// merge
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> merge(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::merge_impl(first1, last1, first2, last2, result, comp, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> merge_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::merge(first1, last1, first2, last2, result),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(
|
||||
NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first1, last1) + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first2, last2),
|
||||
sprout::size(result)
|
||||
)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// merge
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> merge(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::merge_impl(first1, last1, first2, last2, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_MERGE_HPP
|
|
@ -1,71 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_NTH_ELEMENT_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_NTH_ELEMENT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/nth_element.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> nth_element_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator nth,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::nth_element(cont, nth, comp),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::begin(cont), nth) + 1
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// nth_element
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> nth_element(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator nth,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::nth_element_impl(cont, nth, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> nth_element_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator nth,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::nth_element(cont, nth),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::begin(cont), nth) + 1
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// nth_element
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> nth_element(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator nth
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::nth_element_impl(cont, nth, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_NTH_ELEMENT_HPP
|
|
@ -1,71 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_PARTIAL_SORT_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_PARTIAL_SORT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/partial_sort.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> partial_sort_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::partial_sort(cont, middle, comp),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::begin(cont), middle)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// partial_sort
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> partial_sort(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::partial_sort_impl(cont, middle, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> partial_sort_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::partial_sort(cont, middle),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::begin(cont), middle)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// partial_sort
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> partial_sort(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::partial_sort_impl(cont, middle, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_PARTIAL_SORT_HPP
|
|
@ -1,42 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_PARTITION_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_PARTITION_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/partition.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> partition_impl(
|
||||
Container const& cont,
|
||||
Predicate pred,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::partition(cont, pred),
|
||||
offset,
|
||||
offset + sprout::size(cont) - NS_SSCRISK_CEL_OR_SPROUT_DETAIL::count_if(sprout::begin(cont), sprout::end(cont), pred)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// partition
|
||||
//
|
||||
template<typename Container, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> partition(
|
||||
Container const& cont,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::partition_impl(cont, pred, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_PARTITION_HPP
|
|
@ -1,46 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_PARTITION_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_PARTITION_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/partition_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> partition_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::partition_copy(first, last, result, pred),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::count_if(first, last, pred), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// partition_copy
|
||||
//
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> partition_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::partition_copy_impl(first, last, result, pred, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_PARTITION_COPY_HPP
|
|
@ -1,66 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_POP_HEAP_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_POP_HEAP_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/pop_heap.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> pop_heap_impl(
|
||||
Container const& cont,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::pop_heap(cont, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont) - 1
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// pop_heap
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> pop_heap(
|
||||
Container const& cont,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::pop_heap_impl(cont, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> pop_heap_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::pop_heap(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont) - 1
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// pop_heap
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> pop_heap(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::pop_heap_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_POP_HEAP_HPP
|
|
@ -1,66 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_PUSH_HEAP_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_PUSH_HEAP_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/push_heap.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> push_heap_impl(
|
||||
Container const& cont,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::push_heap(cont, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// push_heap
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> push_heap(
|
||||
Container const& cont,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::push_heap_impl(cont, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> push_heap_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::push_heap(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// push_heap
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> push_heap(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::push_heap_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_PUSH_HEAP_HPP
|
|
@ -1,42 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_REMOVE_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_REMOVE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/remove.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> remove_impl(
|
||||
Container const& cont,
|
||||
T const& value,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::remove(cont, value),
|
||||
offset,
|
||||
offset + sprout::size(cont) - NS_SSCRISK_CEL_OR_SPROUT_DETAIL::count(sprout::begin(cont), sprout::end(cont), value)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// remove
|
||||
//
|
||||
template<typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> remove(
|
||||
Container const& cont,
|
||||
T const& value
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::remove_impl(cont, value, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_REMOVE_HPP
|
|
@ -1,47 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_REMOVE_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_REMOVE_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/remove_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> remove_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
T const& value,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::remove_copy(first, last, result, value),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first, last) - NS_SSCRISK_CEL_OR_SPROUT_DETAIL::count(first, last, value), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// remove_copy
|
||||
//
|
||||
template<typename Iterator, typename Result, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> remove_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
T const& value
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::remove_copy_impl(first, last, result, value, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_REMOVE_COPY_HPP
|
|
@ -1,47 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_REMOVE_COPY_IF_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_REMOVE_COPY_IF_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/remove_copy_if.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> remove_copy_if_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::remove_copy_if(first, last, result, pred),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first, last) - NS_SSCRISK_CEL_OR_SPROUT_DETAIL::count_if(first, last, pred), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// remove_copy_if
|
||||
//
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> remove_copy_if(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::remove_copy_if_impl(first, last, result, pred, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_REMOVE_COPY_IF_HPP
|
|
@ -1,42 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_REMOVE_IF_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_REMOVE_IF_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/remove_if.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> remove_if_impl(
|
||||
Container const& cont,
|
||||
Predicate pred,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::remove_if(cont, pred),
|
||||
offset,
|
||||
offset + sprout::size(cont) - NS_SSCRISK_CEL_OR_SPROUT_DETAIL::count_if(sprout::begin(cont), sprout::end(cont), pred)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// remove_if
|
||||
//
|
||||
template<typename Container, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> remove_if(
|
||||
Container const& cont,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::remove_if_impl(cont, pred, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_REMOVE_IF_HPP
|
|
@ -1,43 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_REPLACE_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_REPLACE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/replace.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> replace_impl(
|
||||
Container const& cont,
|
||||
T const& old_value,
|
||||
T const& new_value,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::replace(cont, old_value, new_value),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// replace
|
||||
//
|
||||
template<typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> replace(
|
||||
Container const& cont,
|
||||
T const& old_value,
|
||||
T const& new_value
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::replace_impl(cont, old_value, new_value, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_REPLACE_HPP
|
|
@ -1,49 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_REPLACE_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_REPLACE_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/replace_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> replace_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
T const& old_value,
|
||||
T const& new_value,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::replace_copy(first, last, result, old_value, new_value),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first, last), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// replace_copy
|
||||
//
|
||||
template<typename Iterator, typename Result, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> replace_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
T const& old_value,
|
||||
T const& new_value
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::replace_copy_impl(first, last, result, old_value, new_value, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_REPLACE_COPY_HPP
|
|
@ -1,49 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_REPLACE_COPY_IF_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_REPLACE_COPY_IF_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/replace_copy_if.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename T, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> replace_copy_if_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred,
|
||||
T const& new_value,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::replace_copy_if(first, last, result, pred, new_value),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first, last), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// replace_copy_if
|
||||
//
|
||||
template<typename Iterator, typename Result, typename T, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> replace_copy_if(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred,
|
||||
T const& new_value
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::replace_copy_if_impl(first, last, result, pred, new_value, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_REPLACE_COPY_IF_HPP
|
|
@ -1,43 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_REPLACE_IF_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_REPLACE_IF_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/replace_if.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename T, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> replace_if_impl(
|
||||
Container const& cont,
|
||||
Predicate pred,
|
||||
T const& new_value,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::replace_if(cont, pred, new_value),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// replace_if
|
||||
//
|
||||
template<typename Container, typename T, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> replace_if(
|
||||
Container const& cont,
|
||||
Predicate pred,
|
||||
T const& new_value
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::replace_if_impl(cont, pred, new_value, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_REPLACE_IF_HPP
|
|
@ -1,39 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_REVERSE_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_REVERSE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/reverse.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> reverse_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::reverse(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// reverse
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> reverse(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::reverse_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_REVERSE_HPP
|
|
@ -1,45 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_REVERSE_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_REVERSE_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/reverse_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> reverse_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::reverse_copy(first, last, result),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first, last), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// reverse_copy
|
||||
//
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> reverse_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::reverse_copy_impl(first, last, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_REVERSE_COPY_HPP
|
|
@ -1,41 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_ROTATE_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_ROTATE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/rotate.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> rotate_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::rotate(cont, middle),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// rotate
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> rotate(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::rotate_impl(cont, middle, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_ROTATE_HPP
|
|
@ -1,47 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_ROTATE_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_ROTATE_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/rotate_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> rotate_copy_impl(
|
||||
Iterator first,
|
||||
Iterator middle,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::rotate_copy(first, middle, last, result),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first, last), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// rotate_copy
|
||||
//
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> rotate_copy(
|
||||
Iterator first,
|
||||
Iterator middle,
|
||||
Iterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::rotate_copy_impl(first, middle, last, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_ROTATE_COPY_HPP
|
|
@ -1,95 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_SET_DIFFERENCE_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_SET_DIFFERENCE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/set_difference.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include <sprout/detail/overlap_count_2.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_difference_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_difference(first1, last1, first2, last2, result, comp),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(
|
||||
NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first1, last1)
|
||||
- sprout::detail::overlap_count_2(first1, last1, first2, last2, comp)
|
||||
,
|
||||
sprout::size(result)
|
||||
)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_difference
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_difference(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::set_difference_impl(first1, last1, first2, last2, result, comp, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_difference_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_difference(first1, last1, first2, last2, result),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(
|
||||
NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first1, last1)
|
||||
- sprout::detail::overlap_count_2(first1, last1, first2, last2)
|
||||
,
|
||||
sprout::size(result)
|
||||
)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_difference
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_difference(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::set_difference_impl(first1, last1, first2, last2, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_SET_DIFFERENCE_HPP
|
|
@ -1,90 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_SET_INTERSECTION_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_SET_INTERSECTION_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/set_intersection.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include <sprout/detail/overlap_count_2.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_intersection_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_intersection(first1, last1, first2, last2, result, comp),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(
|
||||
sprout::detail::overlap_count_2(first1, last1, first2, last2, comp),
|
||||
sprout::size(result)
|
||||
)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_intersection
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_intersection(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::set_intersection_impl(first1, last1, first2, last2, result, comp, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_intersection_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_intersection(first1, last1, first2, last2, result),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(
|
||||
sprout::detail::overlap_count_2(first1, last1, first2, last2),
|
||||
sprout::size(result)
|
||||
)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_intersection
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_intersection(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::set_intersection_impl(first1, last1, first2, last2, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_SET_INTERSECTION_HPP
|
|
@ -1,97 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_SET_SYMMETRIC_DIFFERENCE_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_SET_SYMMETRIC_DIFFERENCE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/set_symmetric_difference.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include <sprout/detail/overlap_count_2.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_symmetric_difference_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_symmetric_difference(first1, last1, first2, last2, result, comp),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(
|
||||
NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first1, last1)
|
||||
+ NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first2, last2)
|
||||
- 2 * sprout::detail::overlap_count_2(first1, last1, first2, last2, comp)
|
||||
,
|
||||
sprout::size(result)
|
||||
)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_symmetric_difference
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_symmetric_difference(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::set_symmetric_difference_impl(first1, last1, first2, last2, result, comp, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_symmetric_difference_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_symmetric_difference(first1, last1, first2, last2, result),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(
|
||||
NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first1, last1)
|
||||
+ NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first2, last2)
|
||||
- 2 * sprout::detail::overlap_count_2(first1, last1, first2, last2)
|
||||
,
|
||||
sprout::size(result)
|
||||
)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_symmetric_difference
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_symmetric_difference(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::set_symmetric_difference_impl(first1, last1, first2, last2, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_SET_SYMMETRIC_DIFFERENCE_HPP
|
|
@ -1,97 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_SET_UNION_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_SET_UNION_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/set_union.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include <sprout/detail/overlap_count_2.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_union_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_union(first1, last1, first2, last2, result, comp),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(
|
||||
NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first1, last1)
|
||||
+ NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first2, last2)
|
||||
- sprout::detail::overlap_count_2(first1, last1, first2, last2, comp)
|
||||
,
|
||||
sprout::size(result)
|
||||
)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_union
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_union(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::set_union_impl(first1, last1, first2, last2, result, comp, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_union_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_union(first1, last1, first2, last2, result),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(
|
||||
NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first1, last1)
|
||||
+ NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first2, last2)
|
||||
- sprout::detail::overlap_count_2(first1, last1, first2, last2)
|
||||
,
|
||||
sprout::size(result)
|
||||
)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_union
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_union(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::set_union_impl(first1, last1, first2, last2, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_SET_UNION_HPP
|
|
@ -1,66 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_SORT_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_SORT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/sort.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort_impl(
|
||||
Container const& cont,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::sort(cont, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// sort
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort(
|
||||
Container const& cont,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::sort_impl(cont, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::sort(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// sort
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::sort_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_SORT_HPP
|
|
@ -1,66 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_SORT_HEAP_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_SORT_HEAP_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/sort_heap.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort_heap_impl(
|
||||
Container const& cont,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::sort_heap(cont, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// sort_heap
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort_heap(
|
||||
Container const& cont,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::sort_heap_impl(cont, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort_heap_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::sort_heap(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// sort_heap
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort_heap(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::sort_heap_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_SORT_HEAP_HPP
|
|
@ -1,42 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_STABLE_PARTITION_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_STABLE_PARTITION_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/stable_partition.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> stable_partition_impl(
|
||||
Container const& cont,
|
||||
Predicate pred,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::stable_partition(cont, pred),
|
||||
offset,
|
||||
offset + sprout::size(cont) - NS_SSCRISK_CEL_OR_SPROUT_DETAIL::count_if(sprout::begin(cont), sprout::end(cont), pred)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// stable_partition
|
||||
//
|
||||
template<typename Container, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> stable_partition(
|
||||
Container const& cont,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::stable_partition_impl(cont, pred, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_STABLE_PARTITION_HPP
|
|
@ -1,46 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_STABLE_PARTITION_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_STABLE_PARTITION_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/stable_partition_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> stable_partition_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::stable_partition_copy(first, last, result, pred),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::count_if(first, last, pred), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// stable_partition_copy
|
||||
//
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> stable_partition_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::stable_partition_copy_impl(first, last, result, pred, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_STABLE_PARTITION_COPY_HPP
|
|
@ -1,66 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_STABLE_SORT_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_STABLE_SORT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/stable_sort.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> stable_sort_impl(
|
||||
Container const& cont,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::stable_sort(cont, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// stable_sort
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> stable_sort(
|
||||
Container const& cont,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::stable_sort_impl(cont, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> stable_sort_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::stable_sort(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// stable_sort
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> stable_sort(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::stable_sort_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_STABLE_SORT_HPP
|
|
@ -1,43 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_SWAP_ELEMENT_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_SWAP_ELEMENT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/swap_element.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> swap_element_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator pos1,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator pos2,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::swap_element(cont, pos1, pos2),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// swap_element
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> swap_element(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator pos1,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator pos2
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::swap_element_impl(cont, pos1, pos2, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_SWAP_ELEMENT_HPP
|
|
@ -1,49 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_SWAP_ELEMENT_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_SWAP_ELEMENT_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/swap_element_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> swap_element_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Iterator pos1,
|
||||
Iterator pos2,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::swap_element_copy(first, last, result, pos1, pos2),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first, last), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// swap_element_copy
|
||||
//
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> swap_element_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Iterator pos1,
|
||||
Iterator pos2
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::swap_element_copy_impl(first, last, result, pos1, pos2, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_SWAP_ELEMENT_COPY_HPP
|
|
@ -1,80 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_TRANSFORM_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_TRANSFORM_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/transform.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename UnaryOperation>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> transform_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
UnaryOperation op,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::transform(first, last, result, op),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first, last), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// transform
|
||||
//
|
||||
template<typename Iterator, typename Result, typename UnaryOperation>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> transform(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
UnaryOperation op
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::transform_impl(first, last, result, op, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename BinaryOperation>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> transform_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Result const& result,
|
||||
BinaryOperation op,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::transform(first1, last1, first2, result, op),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first1, last1), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// transform
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename BinaryOperation>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> transform(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Result const& result,
|
||||
BinaryOperation op
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::transform_impl(first1, last1, first2, result, op, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_TRANSFORM_HPP
|
|
@ -1,67 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_UNIQUE_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_UNIQUE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/unique.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include <sprout/detail/overlap_count.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> unique_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::unique(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont) - sprout::detail::overlap_count(sprout::begin(cont), sprout::end(cont))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// unique
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> unique(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::unique_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container, typename BinaryPredicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> unique_impl(
|
||||
Container const& cont,
|
||||
BinaryPredicate pred,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::unique(cont, pred),
|
||||
offset,
|
||||
offset + sprout::size(cont) - sprout::detail::overlap_count(sprout::begin(cont), sprout::end(cont), pred)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// unique
|
||||
//
|
||||
template<typename Container, typename BinaryPredicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> unique(
|
||||
Container const& cont,
|
||||
BinaryPredicate pred
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::unique_impl(cont, pred, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_UNIQUE_HPP
|
|
@ -1,77 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_INFIT_UNIQUE_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_INFIT_UNIQUE_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/unique_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
#include <sprout/detail/overlap_count.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace infit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> unique_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::unique_copy(first, last, result),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first, last) - sprout::detail::overlap_count(first, last), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// unique_copy
|
||||
//
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> unique_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::unique_copy_impl(first, last, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename BinaryPredicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> unique_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
BinaryPredicate pred,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::unique_copy(first, last, result, pred),
|
||||
offset,
|
||||
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::min(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(first, last) - sprout::detail::overlap_count(first, last, pred), sprout::size(result))
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// unique_copy
|
||||
//
|
||||
template<typename Iterator, typename Result, typename BinaryPredicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> unique_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
BinaryPredicate pred
|
||||
)
|
||||
{
|
||||
return sprout::infit::detail::unique_copy_impl(first, last, result, pred, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_INFIT_UNIQUE_COPY_HPP
|
|
@ -1,50 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/algorithm/outfit/copy.hpp>
|
||||
#include <sprout/algorithm/outfit/copy_n.hpp>
|
||||
#include <sprout/algorithm/outfit/copy_if.hpp>
|
||||
#include <sprout/algorithm/outfit/copy_backward.hpp>
|
||||
#include <sprout/algorithm/outfit/transform.hpp>
|
||||
#include <sprout/algorithm/outfit/replace.hpp>
|
||||
#include <sprout/algorithm/outfit/replace_if.hpp>
|
||||
#include <sprout/algorithm/outfit/replace_copy.hpp>
|
||||
#include <sprout/algorithm/outfit/replace_copy_if.hpp>
|
||||
#include <sprout/algorithm/outfit/fill.hpp>
|
||||
#include <sprout/algorithm/outfit/fill_n.hpp>
|
||||
#include <sprout/algorithm/outfit/generate.hpp>
|
||||
#include <sprout/algorithm/outfit/generate_n.hpp>
|
||||
#include <sprout/algorithm/outfit/remove.hpp>
|
||||
#include <sprout/algorithm/outfit/remove_if.hpp>
|
||||
#include <sprout/algorithm/outfit/remove_copy.hpp>
|
||||
#include <sprout/algorithm/outfit/remove_copy_if.hpp>
|
||||
#include <sprout/algorithm/outfit/unique.hpp>
|
||||
#include <sprout/algorithm/outfit/unique_copy.hpp>
|
||||
#include <sprout/algorithm/outfit/reverse.hpp>
|
||||
#include <sprout/algorithm/outfit/reverse_copy.hpp>
|
||||
#include <sprout/algorithm/outfit/rotate.hpp>
|
||||
#include <sprout/algorithm/outfit/rotate_copy.hpp>
|
||||
#include <sprout/algorithm/outfit/partition.hpp>
|
||||
#include <sprout/algorithm/outfit/partition_copy.hpp>
|
||||
#include <sprout/algorithm/outfit/stable_partition.hpp>
|
||||
#include <sprout/algorithm/outfit/stable_partition_copy.hpp>
|
||||
#include <sprout/algorithm/outfit/sort.hpp>
|
||||
#include <sprout/algorithm/outfit/stable_sort.hpp>
|
||||
#include <sprout/algorithm/outfit/partial_sort.hpp>
|
||||
#include <sprout/algorithm/outfit/nth_element.hpp>
|
||||
#include <sprout/algorithm/outfit/merge.hpp>
|
||||
#include <sprout/algorithm/outfit/inplace_merge.hpp>
|
||||
#include <sprout/algorithm/outfit/set_union.hpp>
|
||||
#include <sprout/algorithm/outfit/set_intersection.hpp>
|
||||
#include <sprout/algorithm/outfit/set_difference.hpp>
|
||||
#include <sprout/algorithm/outfit/set_symmetric_difference.hpp>
|
||||
#include <sprout/algorithm/outfit/push_heap.hpp>
|
||||
#include <sprout/algorithm/outfit/pop_heap.hpp>
|
||||
#include <sprout/algorithm/outfit/make_heap.hpp>
|
||||
#include <sprout/algorithm/outfit/make_partial_heap.hpp>
|
||||
#include <sprout/algorithm/outfit/sort_heap.hpp>
|
||||
#include <sprout/algorithm/outfit/swap_element.hpp>
|
||||
#include <sprout/algorithm/outfit/swap_element_copy.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_HPP
|
|
@ -1,43 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::copy(first, last, result),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// copy
|
||||
//
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::copy_impl(first, last, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_COPY_HPP
|
|
@ -1,43 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_COPY_BACKWARD_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_COPY_BACKWARD_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/copy_backward.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_backward_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::copy_backward(first, last, result),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// copy_backward
|
||||
//
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_backward(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::copy_backward_impl(first, last, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_COPY_BACKWARD_HPP
|
|
@ -1,45 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_COPY_IF_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_COPY_IF_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/copy_if.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_if_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::copy_if(first, last, result, pred),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// copy_if
|
||||
//
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_if(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::copy_if_impl(first, last, result, pred, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_COPY_IF_HPP
|
|
@ -1,43 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_COPY_N_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_COPY_N_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/copy_n.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Size, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_n_impl(
|
||||
Iterator first,
|
||||
Size n,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::copy_n(first, n, result),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// copy_n
|
||||
//
|
||||
template<typename Iterator, typename Size, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_n(
|
||||
Iterator first,
|
||||
Size n,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::copy_n_impl(first, n, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_COPY_N_HPP
|
|
@ -1,41 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_FILL_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_FILL_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/fill.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> fill_impl(
|
||||
Container const& cont,
|
||||
T const& value,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::fill(cont, value),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// fill
|
||||
//
|
||||
template<typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> fill(
|
||||
Container const& cont,
|
||||
T const& value
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::fill_impl(cont, value, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_FILL_HPP
|
|
@ -1,43 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_FILL_SUB_N_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_FILL_SUB_N_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/fill_n.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Size, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> fill_n_impl(
|
||||
Container const& cont,
|
||||
Size n,
|
||||
T const& value,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::fill_n(cont, n, value),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// fill_n
|
||||
//
|
||||
template<typename Container, typename Size, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> fill_n(
|
||||
Container const& cont,
|
||||
Size n,
|
||||
T const& value
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::fill_n_impl(cont, n, value, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_FILL_SUB_N_HPP
|
|
@ -1,43 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_GENERATE_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_GENERATE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/generate.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Generator, typename... Inits>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> generate_impl(
|
||||
Container const& cont,
|
||||
Generator gen,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset,
|
||||
Inits const&... inits
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::generate(cont, gen, inits...),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// generate
|
||||
//
|
||||
template<typename Container, typename Generator, typename... Inits>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> generate(
|
||||
Container const& cont,
|
||||
Generator gen,
|
||||
Inits const&... inits
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::generate_impl(cont, gen, sprout::fixed_begin_offset(cont), inits...);
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_GENERATE_HPP
|
|
@ -1,45 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_GENERATE_N_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_GENERATE_N_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/generate_n.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Size, typename Generator, typename... Inits>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> generate_n_impl(
|
||||
Container const& cont,
|
||||
Size n,
|
||||
Generator gen,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset,
|
||||
Inits const&... inits
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::generate_n(cont, n, gen, inits...),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// generate_n
|
||||
//
|
||||
template<typename Container, typename Size, typename Generator, typename... Inits>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> generate_n(
|
||||
Container const& cont,
|
||||
Size n,
|
||||
Generator gen,
|
||||
Inits const&... inits
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::generate_n_impl(cont, n, gen, sprout::fixed_begin_offset(cont), inits...);
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_GENERATE_N_HPP
|
|
@ -1,70 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_INPLACE_MERGE_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_INPLACE_MERGE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/inplace_merge.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> inplace_merge_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::inplace_merge(cont, middle, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// inplace_merge
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> inplace_merge(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::inplace_merge_impl(cont, middle, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> inplace_merge_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::inplace_merge(cont, middle),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// inplace_merge
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> inplace_merge(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::inplace_merge_impl(cont, middle, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_INPLACE_MERGE_HPP
|
|
@ -1,66 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_MAKE_HEAP_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_MAKE_HEAP_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/make_heap.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_heap_impl(
|
||||
Container const& cont,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::make_heap(cont, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// make_heap
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_heap(
|
||||
Container const& cont,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::make_heap_impl(cont, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_heap_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::make_heap(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// make_heap
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_heap(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::make_heap_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_MAKE_HEAP_HPP
|
|
@ -1,70 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_MAKE_PARTIAL_HEAP_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_MAKE_PARTIAL_HEAP_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/make_partial_heap.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_partial_heap_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::make_partial_heap(cont, middle, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// make_partial_heap
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_partial_heap(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::make_partial_heap_impl(cont, middle, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_partial_heap_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::make_partial_heap(cont, middle),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// make_partial_heap
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> make_partial_heap(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::make_partial_heap_impl(cont, middle, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_MAKE_PARTIAL_HEAP_HPP
|
|
@ -1,82 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_MERGE_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_MERGE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/merge.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> merge_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::merge(first1, last1, first2, last2, result, comp),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// merge
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> merge(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::merge_impl(first1, last1, first2, last2, result, comp, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> merge_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::merge(first1, last1, first2, last2, result),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// merge
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> merge(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::merge_impl(first1, last1, first2, last2, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_MERGE_HPP
|
|
@ -1,70 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_NTH_ELEMENT_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_NTH_ELEMENT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/nth_element.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> nth_element_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator nth,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::nth_element(cont, nth, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// nth_element
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> nth_element(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator nth,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::nth_element_impl(cont, nth, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> nth_element_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator nth,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::nth_element(cont, nth),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// nth_element
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> nth_element(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator nth
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::nth_element_impl(cont, nth, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_NTH_ELEMENT_HPP
|
|
@ -1,70 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_PARTIAL_SORT_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_PARTIAL_SORT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/partial_sort.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> partial_sort_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::partial_sort(cont, middle, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// partial_sort
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> partial_sort(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::partial_sort_impl(cont, middle, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> partial_sort_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::partial_sort(cont, middle),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// partial_sort
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> partial_sort(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::partial_sort_impl(cont, middle, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_PARTIAL_SORT_HPP
|
|
@ -1,41 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_PARTITION_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_PARTITION_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/partition.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> partition_impl(
|
||||
Container const& cont,
|
||||
Predicate pred,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::partition(cont, pred),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// partition
|
||||
//
|
||||
template<typename Container, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> partition(
|
||||
Container const& cont,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::partition_impl(cont, pred, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_PARTITION_HPP
|
|
@ -1,45 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_PARTITION_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_PARTITION_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/partition_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> partition_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::partition_copy(first, last, result, pred),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// partition_copy
|
||||
//
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> partition_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::partition_copy_impl(first, last, result, pred, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_PARTITION_COPY_HPP
|
|
@ -1,66 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_POP_HEAP_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_POP_HEAP_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/pop_heap.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> pop_heap_impl(
|
||||
Container const& cont,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::pop_heap(cont, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// pop_heap
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> pop_heap(
|
||||
Container const& cont,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::pop_heap_impl(cont, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> pop_heap_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::pop_heap(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// pop_heap
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> pop_heap(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::pop_heap_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_POP_HEAP_HPP
|
|
@ -1,66 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_PUSH_HEAP_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_PUSH_HEAP_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/push_heap.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> push_heap_impl(
|
||||
Container const& cont,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::push_heap(cont, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// push_heap
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> push_heap(
|
||||
Container const& cont,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::push_heap_impl(cont, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> push_heap_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::push_heap(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// push_heap
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> push_heap(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::push_heap_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_PUSH_HEAP_HPP
|
|
@ -1,41 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_REMOVE_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_REMOVE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/remove.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> remove_impl(
|
||||
Container const& cont,
|
||||
T const& value,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::remove(cont, value),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// remove
|
||||
//
|
||||
template<typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> remove(
|
||||
Container const& cont,
|
||||
T const& value
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::remove_impl(cont, value, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_REMOVE_HPP
|
|
@ -1,45 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_REMOVE_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_REMOVE_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/remove_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> remove_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
T const& value,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::remove_copy(first, last, result, value),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// remove_copy
|
||||
//
|
||||
template<typename Iterator, typename Result, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> remove_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
T const& value
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::remove_copy_impl(first, last, result, value, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_REMOVE_COPY_HPP
|
|
@ -1,45 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_REMOVE_COPY_IF_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_REMOVE_COPY_IF_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/remove_copy_if.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> remove_copy_if_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::remove_copy_if(first, last, result, pred),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// remove_copy_if
|
||||
//
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> remove_copy_if(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::remove_copy_if_impl(first, last, result, pred, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_REMOVE_COPY_IF_HPP
|
|
@ -1,41 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_REMOVE_IF_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_REMOVE_IF_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/remove_if.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> remove_if_impl(
|
||||
Container const& cont,
|
||||
Predicate pred,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::remove_if(cont, pred),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// remove_if
|
||||
//
|
||||
template<typename Container, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> remove_if(
|
||||
Container const& cont,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::remove_if_impl(cont, pred, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_REMOVE_IF_HPP
|
|
@ -1,43 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_REPLACE_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_REPLACE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/replace.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> replace_impl(
|
||||
Container const& cont,
|
||||
T const& old_value,
|
||||
T const& new_value,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::replace(cont, old_value, new_value),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// replace
|
||||
//
|
||||
template<typename Container, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> replace(
|
||||
Container const& cont,
|
||||
T const& old_value,
|
||||
T const& new_value
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::replace_impl(cont, old_value, new_value, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_REPLACE_HPP
|
|
@ -1,47 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_REPLACE_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_REPLACE_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/replace_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> replace_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
T const& old_value,
|
||||
T const& new_value,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::replace_copy(first, last, result, old_value, new_value),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// replace_copy
|
||||
//
|
||||
template<typename Iterator, typename Result, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> replace_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
T const& old_value,
|
||||
T const& new_value
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::replace_copy_impl(first, last, result, old_value, new_value, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_REPLACE_COPY_HPP
|
|
@ -1,47 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_REPLACE_COPY_IF_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_REPLACE_COPY_IF_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/replace_copy_if.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename T, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> replace_copy_if_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred,
|
||||
T const& new_value,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::replace_copy_if(first, last, result, pred, new_value),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// replace_copy_if
|
||||
//
|
||||
template<typename Iterator, typename Result, typename T, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> replace_copy_if(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred,
|
||||
T const& new_value
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::replace_copy_if_impl(first, last, result, pred, new_value, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_REPLACE_COPY_IF_HPP
|
|
@ -1,43 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_REPLACE_IF_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_REPLACE_IF_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/replace_if.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename T, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> replace_if_impl(
|
||||
Container const& cont,
|
||||
Predicate pred,
|
||||
T const& new_value,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::replace_if(cont, pred, new_value),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// replace_if
|
||||
//
|
||||
template<typename Container, typename T, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> replace_if(
|
||||
Container const& cont,
|
||||
Predicate pred,
|
||||
T const& new_value
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::replace_if_impl(cont, pred, new_value, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_REPLACE_IF_HPP
|
|
@ -1,39 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_REVERSE_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_REVERSE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/reverse.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> reverse_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::reverse(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// reverse
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> reverse(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::reverse_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_REVERSE_HPP
|
|
@ -1,43 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_REVERSE_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_REVERSE_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/reverse_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> reverse_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::reverse_copy(first, last, result),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// reverse_copy
|
||||
//
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> reverse_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::reverse_copy_impl(first, last, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_REVERSE_COPY_HPP
|
|
@ -1,41 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_ROTATE_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_ROTATE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/rotate.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> rotate_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::rotate(cont, middle),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// rotate
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> rotate(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator middle
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::rotate_impl(cont, middle, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_ROTATE_HPP
|
|
@ -1,45 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_ROTATE_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_ROTATE_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/rotate_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> rotate_copy_impl(
|
||||
Iterator first,
|
||||
Iterator middle,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::rotate_copy(first, middle, last, result),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// rotate_copy
|
||||
//
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> rotate_copy(
|
||||
Iterator first,
|
||||
Iterator middle,
|
||||
Iterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::rotate_copy_impl(first, middle, last, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_ROTATE_COPY_HPP
|
|
@ -1,82 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_SET_DIFFERENCE_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_SET_DIFFERENCE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/set_difference.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_difference_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_difference(first1, last1, first2, last2, result, comp),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_difference
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_difference(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::set_difference_impl(first1, last1, first2, last2, result, comp, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_difference_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_difference(first1, last1, first2, last2, result),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_difference
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_difference(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::set_difference_impl(first1, last1, first2, last2, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_SET_DIFFERENCE_HPP
|
|
@ -1,82 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_SET_INTERSECTION_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_SET_INTERSECTION_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/set_intersection.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_intersection_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_intersection(first1, last1, first2, last2, result, comp),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_intersection
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_intersection(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::set_intersection_impl(first1, last1, first2, last2, result, comp, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_intersection_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_intersection(first1, last1, first2, last2, result),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_intersection
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_intersection(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::set_intersection_impl(first1, last1, first2, last2, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_SET_INTERSECTION_HPP
|
|
@ -1,82 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_SET_SYMMETRIC_DIFFERENCE_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_SET_SYMMETRIC_DIFFERENCE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/set_symmetric_difference.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_symmetric_difference_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_symmetric_difference(first1, last1, first2, last2, result, comp),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_symmetric_difference
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_symmetric_difference(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::set_symmetric_difference_impl(first1, last1, first2, last2, result, comp, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_symmetric_difference_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_symmetric_difference(first1, last1, first2, last2, result),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_symmetric_difference
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_symmetric_difference(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::set_symmetric_difference_impl(first1, last1, first2, last2, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_SET_SYMMETRIC_DIFFERENCE_HPP
|
|
@ -1,82 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_SET_UNION_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_SET_UNION_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/set_union.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_union_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_union(first1, last1, first2, last2, result, comp),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_union
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_union(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::set_union_impl(first1, last1, first2, last2, result, comp, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_union_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::set_union(first1, last1, first2, last2, result),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// set_union
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> set_union(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Iterator2 last2,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::set_union_impl(first1, last1, first2, last2, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_SET_UNION_HPP
|
|
@ -1,66 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_SORT_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_SORT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/sort.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort_impl(
|
||||
Container const& cont,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::sort(cont, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// sort
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort(
|
||||
Container const& cont,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::sort_impl(cont, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::sort(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// sort
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::sort_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_SORT_HPP
|
|
@ -1,66 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_SORT_HEAP_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_SORT_HEAP_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/sort_heap.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort_heap_impl(
|
||||
Container const& cont,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::sort_heap(cont, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// sort_heap
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort_heap(
|
||||
Container const& cont,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::sort_heap_impl(cont, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort_heap_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::sort_heap(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// sort_heap
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> sort_heap(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::sort_heap_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_SORT_HEAP_HPP
|
|
@ -1,41 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_STABLE_PARTITION_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_STABLE_PARTITION_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/stable_partition.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> stable_partition_impl(
|
||||
Container const& cont,
|
||||
Predicate pred,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::stable_partition(cont, pred),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// stable_partition
|
||||
//
|
||||
template<typename Container, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> stable_partition(
|
||||
Container const& cont,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::stable_partition_impl(cont, pred, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_STABLE_PARTITION_HPP
|
|
@ -1,45 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_STABLE_PARTITION_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_STABLE_PARTITION_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/stable_partition_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> stable_partition_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::stable_partition_copy(first, last, result, pred),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// stable_partition_copy
|
||||
//
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> stable_partition_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::stable_partition_copy_impl(first, last, result, pred, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_STABLE_PARTITION_COPY_HPP
|
|
@ -1,66 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_STABLE_SORT_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_STABLE_SORT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/stable_sort.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> stable_sort_impl(
|
||||
Container const& cont,
|
||||
Compare comp,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::stable_sort(cont, comp),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// stable_sort
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> stable_sort(
|
||||
Container const& cont,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::stable_sort_impl(cont, comp, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> stable_sort_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::stable_sort(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// stable_sort
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> stable_sort(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::stable_sort_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_STABLE_SORT_HPP
|
|
@ -1,43 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_SWAP_ELEMENT_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_SWAP_ELEMENT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/swap_element.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> swap_element_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator pos1,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator pos2,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::swap_element(cont, pos1, pos2),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// swap_element
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> swap_element(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator pos1,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator pos2
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::swap_element_impl(cont, pos1, pos2, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_SWAP_ELEMENT_HPP
|
|
@ -1,47 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_SWAP_ELEMENT_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_SWAP_ELEMENT_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/swap_element_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> swap_element_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Iterator pos1,
|
||||
Iterator pos2,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::swap_element_copy(first, last, result, pos1, pos2),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// swap_element_copy
|
||||
//
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> swap_element_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
Iterator pos1,
|
||||
Iterator pos2
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::swap_element_copy_impl(first, last, result, pos1, pos2, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_SWAP_ELEMENT_COPY_HPP
|
|
@ -1,78 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_TRANSFORM_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_TRANSFORM_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/transform.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename UnaryOperation>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> transform_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
UnaryOperation op,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::transform(first, last, result, op),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// transform
|
||||
//
|
||||
template<typename Iterator, typename Result, typename UnaryOperation>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> transform(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
UnaryOperation op
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::transform_impl(first, last, result, op, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename BinaryOperation>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> transform_impl(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Result const& result,
|
||||
BinaryOperation op,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::transform(first1, last1, first2, result, op),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// transform
|
||||
//
|
||||
template<typename Iterator1, typename Iterator2, typename Result, typename BinaryOperation>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> transform(
|
||||
Iterator1 first1,
|
||||
Iterator1 last1,
|
||||
Iterator2 first2,
|
||||
Result const& result,
|
||||
BinaryOperation op
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::transform_impl(first1, last1, first2, result, op, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_TRANSFORM_HPP
|
|
@ -1,66 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_UNIQUE_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_UNIQUE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/unique.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> unique_impl(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::unique(cont),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// unique
|
||||
//
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> unique(
|
||||
Container const& cont
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::unique_impl(cont, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Container, typename BinaryPredicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> unique_impl(
|
||||
Container const& cont,
|
||||
BinaryPredicate pred,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::unique(cont, pred),
|
||||
offset,
|
||||
offset + sprout::size(cont)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// unique
|
||||
//
|
||||
template<typename Container, typename BinaryPredicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Container>::fixed_container_type> unique(
|
||||
Container const& cont,
|
||||
BinaryPredicate pred
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::unique_impl(cont, pred, sprout::fixed_begin_offset(cont));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_UNIQUE_HPP
|
|
@ -1,74 +0,0 @@
|
|||
#ifndef SPROUT_ALGORITHM_OUTFIT_UNIQUE_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_OUTFIT_UNIQUE_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/unique_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace outfit {
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> unique_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::unique_copy(first, last, result),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// unique_copy
|
||||
//
|
||||
template<typename Iterator, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> unique_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::unique_copy_impl(first, last, result, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Iterator, typename Result, typename BinaryPredicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> unique_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
BinaryPredicate pred,
|
||||
typename sprout::fixed_container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::fixed::unique_copy(first, last, result, pred),
|
||||
offset,
|
||||
offset + sprout::size(result)
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// unique_copy
|
||||
//
|
||||
template<typename Iterator, typename Result, typename BinaryPredicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> unique_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
BinaryPredicate pred
|
||||
)
|
||||
{
|
||||
return sprout::outfit::detail::unique_copy_impl(first, last, result, pred, sprout::fixed_begin_offset(result));
|
||||
}
|
||||
} // namespace outfit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_OUTFIT_UNIQUE_COPY_HPP
|
|
@ -1,25 +0,0 @@
|
|||
#ifndef SPROUT_RANGE_ALGORITHM_INFIT_HPP
|
||||
#define SPROUT_RANGE_ALGORITHM_INFIT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/range/algorithm/infit/copy.hpp>
|
||||
#include <sprout/range/algorithm/infit/copy_if.hpp>
|
||||
#include <sprout/range/algorithm/infit/copy_backward.hpp>
|
||||
#include <sprout/range/algorithm/infit/transform.hpp>
|
||||
#include <sprout/range/algorithm/infit/replace_copy.hpp>
|
||||
#include <sprout/range/algorithm/infit/replace_copy_if.hpp>
|
||||
#include <sprout/range/algorithm/infit/remove_copy.hpp>
|
||||
#include <sprout/range/algorithm/infit/remove_copy_if.hpp>
|
||||
#include <sprout/range/algorithm/infit/unique_copy.hpp>
|
||||
#include <sprout/range/algorithm/infit/reverse_copy.hpp>
|
||||
#include <sprout/range/algorithm/infit/rotate_copy.hpp>
|
||||
#include <sprout/range/algorithm/infit/partition_copy.hpp>
|
||||
#include <sprout/range/algorithm/infit/stable_partition_copy.hpp>
|
||||
#include <sprout/range/algorithm/infit/merge.hpp>
|
||||
#include <sprout/range/algorithm/infit/set_union.hpp>
|
||||
#include <sprout/range/algorithm/infit/set_intersection.hpp>
|
||||
#include <sprout/range/algorithm/infit/set_difference.hpp>
|
||||
#include <sprout/range/algorithm/infit/set_symmetric_difference.hpp>
|
||||
#include <sprout/range/algorithm/infit/swap_element_copy.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_RANGE_ALGORITHM_INFIT_HPP
|
|
@ -1,28 +0,0 @@
|
|||
#ifndef SPROUT_RANGE_ALGORITHM_INFIT_COPY_HPP
|
||||
#define SPROUT_RANGE_ALGORITHM_INFIT_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/infit/copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace range {
|
||||
namespace infit {
|
||||
//
|
||||
// copy
|
||||
//
|
||||
template<typename Input, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy(
|
||||
Input const& input,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::infit::copy(sprout::begin(input), sprout::end(input), result);
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_RANGE_ALGORITHM_INFIT_COPY_HPP
|
|
@ -1,28 +0,0 @@
|
|||
#ifndef SPROUT_RANGE_ALGORITHM_INFIT_COPY_BACKWARD_HPP
|
||||
#define SPROUT_RANGE_ALGORITHM_INFIT_COPY_BACKWARD_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/infit/copy_backward.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace range {
|
||||
namespace infit {
|
||||
//
|
||||
// copy_backward
|
||||
//
|
||||
template<typename Input, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_backward(
|
||||
Input const& input,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::infit::copy_backward(sprout::begin(input), sprout::end(input), result);
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_RANGE_ALGORITHM_INFIT_COPY_BACKWARD_HPP
|
|
@ -1,28 +0,0 @@
|
|||
#ifndef SPROUT_RANGE_ALGORITHM_INFIT_COPY_IF_HPP
|
||||
#define SPROUT_RANGE_ALGORITHM_INFIT_COPY_IF_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/infit/copy_if.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace range {
|
||||
namespace infit {
|
||||
//
|
||||
// copy_if
|
||||
//
|
||||
template<typename Input, typename Result>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> copy_if(
|
||||
Input const& input,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::infit::copy_if(sprout::begin(input), sprout::end(input), result);
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_RANGE_ALGORITHM_INFIT_COPY_IF_HPP
|
|
@ -1,42 +0,0 @@
|
|||
#ifndef SPROUT_RANGE_ALGORITHM_INFOT_MERGE_HPP
|
||||
#define SPROUT_RANGE_ALGORITHM_INFOT_MERGE_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/infit/merge.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace range {
|
||||
namespace infit {
|
||||
//
|
||||
// merge
|
||||
//
|
||||
template<typename Input1, typename Input2, typename Result, typename Compare>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed_container_traits<Result>::fixed_container_type merge(
|
||||
Input1 const& input1,
|
||||
Input2 const& input2,
|
||||
Result const& result,
|
||||
Compare comp
|
||||
)
|
||||
{
|
||||
return sprout::infit::merge(sprout::begin(input1), sprout::end(input1), sprout::begin(input2), sprout::end(input2), result, comp);
|
||||
}
|
||||
|
||||
//
|
||||
// merge
|
||||
//
|
||||
template<typename Input1, typename Input2, typename Result>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed_container_traits<Result>::fixed_container_type merge(
|
||||
Input1 const& input1,
|
||||
Input2 const& input2,
|
||||
Result const& result
|
||||
)
|
||||
{
|
||||
return sprout::infit::merge(sprout::begin(input1), sprout::end(input1), sprout::begin(input2), sprout::end(input2), result);
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_RANGE_ALGORITHM_INFOT_MERGE_HPP
|
|
@ -1,29 +0,0 @@
|
|||
#ifndef SPROUT_RANGE_ALGORITHM_INFIT_PARTITION_COPY_HPP
|
||||
#define SPROUT_RANGE_ALGORITHM_INFIT_PARTITION_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/infit/partition_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace range {
|
||||
namespace infit {
|
||||
//
|
||||
// partition_copy
|
||||
//
|
||||
template<typename Input, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> partition_copy(
|
||||
Input const& input,
|
||||
Result const& result,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::infit::partition_copy(sprout::begin(input), sprout::end(input), result, pred);
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_RANGE_ALGORITHM_INFIT_PARTITION_COPY_HPP
|
|
@ -1,29 +0,0 @@
|
|||
#ifndef SPROUT_RANGE_ALGORITHM_INFIT_REMOVE_COPY_HPP
|
||||
#define SPROUT_RANGE_ALGORITHM_INFIT_REMOVE_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/infit/remove_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace range {
|
||||
namespace infit {
|
||||
//
|
||||
// remove_copy
|
||||
//
|
||||
template<typename Input, typename Result, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> remove_copy(
|
||||
Input const& input,
|
||||
Result const& result,
|
||||
T const& value
|
||||
)
|
||||
{
|
||||
return sprout::infit::remove_copy(sprout::begin(input), sprout::end(input), result, value);
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_RANGE_ALGORITHM_INFIT_REMOVE_COPY_HPP
|
|
@ -1,29 +0,0 @@
|
|||
#ifndef SPROUT_RANGE_ALGORITHM_INFIT_REMOVE_COPY_IF_HPP
|
||||
#define SPROUT_RANGE_ALGORITHM_INFIT_REMOVE_COPY_IF_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/infit/remove_copy_if.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace range {
|
||||
namespace infit {
|
||||
//
|
||||
// remove_copy_if
|
||||
//
|
||||
template<typename Input, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> remove_copy_if(
|
||||
Input const& input,
|
||||
Result const& result,
|
||||
Predicate pred
|
||||
)
|
||||
{
|
||||
return sprout::infit::remove_copy_if(sprout::begin(input), sprout::end(input), result, pred);
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_RANGE_ALGORITHM_INFIT_REMOVE_COPY_IF_HPP
|
|
@ -1,30 +0,0 @@
|
|||
#ifndef SPROUT_RANGE_ALGORITHM_INFIT_REPLACE_COPY_HPP
|
||||
#define SPROUT_RANGE_ALGORITHM_INFIT_REPLACE_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/infit/replace_copy.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace range {
|
||||
namespace infit {
|
||||
//
|
||||
// replace_copy
|
||||
//
|
||||
template<typename Input, typename Result, typename T>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> replace_copy(
|
||||
Input const& input,
|
||||
Result const& result,
|
||||
T const& old_value,
|
||||
T const& new_value
|
||||
)
|
||||
{
|
||||
return sprout::infit::replace_copy(sprout::begin(input), sprout::end(input), result, old_value, new_value);
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_RANGE_ALGORITHM_INFIT_REPLACE_COPY_HPP
|
|
@ -1,30 +0,0 @@
|
|||
#ifndef SPROUT_RANGE_ALGORITHM_INFIT_REPLACE_COPY_IF_HPP
|
||||
#define SPROUT_RANGE_ALGORITHM_INFIT_REPLACE_COPY_IF_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/infit/replace_copy_if.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace range {
|
||||
namespace infit {
|
||||
//
|
||||
// replace_copy_if
|
||||
//
|
||||
template<typename Input, typename Result, typename T, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline sprout::sub_array<typename sprout::fixed_container_traits<Result>::fixed_container_type> replace_copy_if(
|
||||
Input const& input,
|
||||
Result const& result,
|
||||
Predicate pred,
|
||||
T const& new_value
|
||||
)
|
||||
{
|
||||
return sprout::infit::replace_copy_if(sprout::begin(input), sprout::end(input), result, pred, new_value);
|
||||
}
|
||||
} // namespace infit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_RANGE_ALGORITHM_INFIT_REPLACE_COPY_IF_HPP
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue