algorithm.hpp 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. ///////////////////////////////////////////////////////////////////////////////
  2. /// \file algorithm.hpp
  3. /// Includes the range-based versions of the algorithms in the
  4. /// C++ standard header file <algorithm>
  5. //
  6. /////////////////////////////////////////////////////////////////////////////
  7. // Copyright 2009 Neil Groves.
  8. // Distributed under the Boost Software License, Version 1.0. (See
  9. // accompanying file LICENSE_1_0.txt or copy at
  10. // http://www.boost.org/LICENSE_1_0.txt)
  11. //
  12. // Acknowledgements:
  13. // This code uses combinations of ideas, techniques and code snippets
  14. // from: Thorsten Ottosen, Eric Niebler, Jeremy Siek,
  15. // and Vladimir Prus'
  16. //
  17. // The original mutating algorithms that served as the first version
  18. // were originally written by Vladimir Prus'
  19. // <[email protected]> code from Boost Wiki
  20. #if defined(_MSC_VER)
  21. #pragma once
  22. #endif
  23. #ifndef BOOST_RANGE_ALGORITHM_HPP_INCLUDED_01012009
  24. #define BOOST_RANGE_ALGORITHM_HPP_INCLUDED_01012009
  25. #include <boost/range/concepts.hpp>
  26. #include <boost/range/iterator_range.hpp>
  27. #include <boost/range/difference_type.hpp>
  28. #include <boost/range/detail/range_return.hpp>
  29. #include <boost/iterator/iterator_traits.hpp>
  30. #include <boost/next_prior.hpp>
  31. #include <algorithm>
  32. // Non-mutating algorithms
  33. #include <boost/range/algorithm/adjacent_find.hpp>
  34. #include <boost/range/algorithm/count.hpp>
  35. #include <boost/range/algorithm/count_if.hpp>
  36. #include <boost/range/algorithm/equal.hpp>
  37. #include <boost/range/algorithm/for_each.hpp>
  38. #include <boost/range/algorithm/find.hpp>
  39. #include <boost/range/algorithm/find_end.hpp>
  40. #include <boost/range/algorithm/find_first_of.hpp>
  41. #include <boost/range/algorithm/find_if.hpp>
  42. #include <boost/range/algorithm/lexicographical_compare.hpp>
  43. #include <boost/range/algorithm/mismatch.hpp>
  44. #include <boost/range/algorithm/search.hpp>
  45. #include <boost/range/algorithm/search_n.hpp>
  46. // Mutating algorithms
  47. #include <boost/range/algorithm/copy.hpp>
  48. #include <boost/range/algorithm/copy_backward.hpp>
  49. #include <boost/range/algorithm/fill.hpp>
  50. #include <boost/range/algorithm/fill_n.hpp>
  51. #include <boost/range/algorithm/generate.hpp>
  52. #include <boost/range/algorithm/inplace_merge.hpp>
  53. #include <boost/range/algorithm/merge.hpp>
  54. #include <boost/range/algorithm/nth_element.hpp>
  55. #include <boost/range/algorithm/partial_sort.hpp>
  56. #include <boost/range/algorithm/partial_sort_copy.hpp>
  57. #include <boost/range/algorithm/partition.hpp>
  58. #include <boost/range/algorithm/random_shuffle.hpp>
  59. #include <boost/range/algorithm/remove.hpp>
  60. #include <boost/range/algorithm/remove_copy.hpp>
  61. #include <boost/range/algorithm/remove_copy_if.hpp>
  62. #include <boost/range/algorithm/remove_if.hpp>
  63. #include <boost/range/algorithm/replace.hpp>
  64. #include <boost/range/algorithm/replace_copy.hpp>
  65. #include <boost/range/algorithm/replace_copy_if.hpp>
  66. #include <boost/range/algorithm/replace_if.hpp>
  67. #include <boost/range/algorithm/reverse.hpp>
  68. #include <boost/range/algorithm/reverse_copy.hpp>
  69. #include <boost/range/algorithm/rotate.hpp>
  70. #include <boost/range/algorithm/rotate_copy.hpp>
  71. #include <boost/range/algorithm/sort.hpp>
  72. #include <boost/range/algorithm/stable_partition.hpp>
  73. #include <boost/range/algorithm/stable_sort.hpp>
  74. #include <boost/range/algorithm/transform.hpp>
  75. #include <boost/range/algorithm/unique.hpp>
  76. #include <boost/range/algorithm/unique_copy.hpp>
  77. // Binary search
  78. #include <boost/range/algorithm/binary_search.hpp>
  79. #include <boost/range/algorithm/equal_range.hpp>
  80. #include <boost/range/algorithm/lower_bound.hpp>
  81. #include <boost/range/algorithm/upper_bound.hpp>
  82. // Set operations of sorted ranges
  83. #include <boost/range/algorithm/set_algorithm.hpp>
  84. // Heap operations
  85. #include <boost/range/algorithm/heap_algorithm.hpp>
  86. // Minimum and Maximum
  87. #include <boost/range/algorithm/max_element.hpp>
  88. #include <boost/range/algorithm/min_element.hpp>
  89. // Permutations
  90. #include <boost/range/algorithm/permutation.hpp>
  91. #endif // include guard