fix algorithm: bogo_sort, bozo_sort

This commit is contained in:
bolero-MURAKAMI 2013-02-04 01:10:26 +09:00
parent aace49ac65
commit f3b405ad0f
75 changed files with 634 additions and 776 deletions

View file

@ -13,26 +13,26 @@ namespace sprout {
//
// merge
//
template<typename Input1, typename Input2, typename Result, typename Compare>
template<typename InputRange1, typename InputRange2, typename Result, typename Compare>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
merge(Input1 const& input1, Input2 const& input2, Result const& result, Compare comp) {
return sprout::fixed::merge(sprout::begin(input1), sprout::end(input1), sprout::begin(input2), sprout::end(input2), result, comp);
merge(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result, Compare comp) {
return sprout::fixed::merge(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp);
}
template<typename Input1, typename Input2, typename Result>
template<typename InputRange1, typename InputRange2, typename Result>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
merge(Input1 const& input1, Input2 const& input2, Result const& result) {
return sprout::fixed::merge(sprout::begin(input1), sprout::end(input1), sprout::begin(input2), sprout::end(input2), result);
merge(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result) {
return sprout::fixed::merge(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result);
}
template<typename Result, typename Input1, typename Input2, typename Compare>
template<typename Result, typename InputRange1, typename InputRange2, typename Compare>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
merge(Input1 const& input1, Input2 const& input2, Compare comp) {
return sprout::fixed::merge<Result>(sprout::begin(input1), sprout::end(input1), sprout::begin(input2), sprout::end(input2), comp);
merge(InputRange1 const& rng1, InputRange2 const& rng2, Compare comp) {
return sprout::fixed::merge<Result>(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), comp);
}
template<typename Result, typename Input1, typename Input2>
template<typename Result, typename InputRange1, typename InputRange2>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
merge(Input1 const& input1, Input2 const& input2) {
return sprout::fixed::merge<Result>(sprout::begin(input1), sprout::end(input1), sprout::begin(input2), sprout::end(input2));
merge(InputRange1 const& rng1, InputRange2 const& rng2) {
return sprout::fixed::merge<Result>(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2));
}
} // namespace fixed