utility_fwd.hpp 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. /* Boost interval/utility.hpp template interface file
  2. *
  3. * Copyright 2013 Cromwell D. Enage
  4. *
  5. * Distributed under the Boost Software License, Version 1.0.
  6. * (See accompanying file LICENSE_1_0.txt or copy at
  7. * http://www.boost.org/LICENSE_1_0.txt)
  8. */
  9. #ifndef BOOST_NUMERIC_INTERVAL_UTILITY_FWD_HPP
  10. #define BOOST_NUMERIC_INTERVAL_UTILITY_FWD_HPP
  11. #include <boost/config.hpp>
  12. #include <boost/numeric/interval/detail/interval_prototype.hpp>
  13. #include <utility>
  14. /*
  15. * Interface of simple functions
  16. */
  17. namespace boost { namespace numeric {
  18. /*
  19. * Utility Functions
  20. */
  21. template<class T, class Policies>
  22. const T& lower(const interval<T,Policies>& x);
  23. template<class T, class Policies>
  24. const T& upper(const interval<T,Policies>& x);
  25. template<class T, class Policies>
  26. T checked_lower(const interval<T,Policies>& x);
  27. template<class T, class Policies>
  28. T width(const interval<T,Policies>& x);
  29. template<class T, class Policies>
  30. T median(const interval<T,Policies>& x);
  31. template<class T, class Policies>
  32. interval<T,Policies> widen(const interval<T,Policies>& x, const T& v);
  33. /*
  34. * Set-like operations
  35. */
  36. template <class T, class Policies>
  37. bool empty(const interval<T,Policies>& x);
  38. template <class T, class Policies>
  39. bool zero_in(const interval<T,Policies>& x);
  40. template <class T, class Policies>
  41. bool in_zero(const interval<T,Policies>& x); // DEPRECATED
  42. template <class T, class Policies>
  43. bool in(const T& x, const interval<T,Policies>& y);
  44. template <class T, class Policies>
  45. bool
  46. subset(
  47. const interval<T,Policies>& x
  48. , const interval<T,Policies>& y
  49. );
  50. template <class T, class Policies1, class Policies2>
  51. bool
  52. proper_subset(
  53. const interval<T,Policies1>& x
  54. , const interval<T,Policies2>& y
  55. );
  56. template <class T, class Policies1, class Policies2>
  57. bool
  58. overlap(
  59. const interval<T,Policies1>& x
  60. , const interval<T,Policies2>& y
  61. );
  62. template <class T, class Policies>
  63. bool singleton(const interval<T, Policies>& x);
  64. template <class T, class Policies1, class Policies2>
  65. bool
  66. equal(
  67. const interval<T,Policies1>& x
  68. , const interval<T,Policies2>& y
  69. );
  70. template <class T, class Policies>
  71. interval<T, Policies>
  72. intersect(
  73. const interval<T,Policies>& x
  74. , const interval<T,Policies>& y
  75. );
  76. template <class T, class Policies>
  77. interval<T, Policies>
  78. hull(const interval<T,Policies>& x, const interval<T,Policies>& y);
  79. template <class T, class Policies>
  80. interval<T, Policies>
  81. hull(const interval<T,Policies>& x, const T& y);
  82. template <class T, class Policies>
  83. interval<T, Policies>
  84. hull(const T& x, const interval<T,Policies>& y);
  85. template <class T>
  86. interval<T> hull(const T& x, const T& y);
  87. template <class T, class Policies>
  88. std::pair<interval<T,Policies>,interval<T,Policies> >
  89. bisect(const interval<T,Policies>& x);
  90. /*
  91. * Elementary functions
  92. */
  93. template <class T, class Policies>
  94. T norm(const interval<T,Policies>& x);
  95. template <class T, class Policies>
  96. interval<T,Policies> abs(const interval<T,Policies>& x);
  97. template <class T, class Policies>
  98. interval<T,Policies>
  99. max BOOST_PREVENT_MACRO_SUBSTITUTION (
  100. const interval<T,Policies>& x
  101. , const interval<T,Policies>& y
  102. );
  103. template <class T, class Policies>
  104. interval<T,Policies>
  105. max BOOST_PREVENT_MACRO_SUBSTITUTION (
  106. const interval<T,Policies>& x
  107. , const T& y
  108. );
  109. template <class T, class Policies>
  110. interval<T,Policies>
  111. max BOOST_PREVENT_MACRO_SUBSTITUTION (
  112. const T& x
  113. , const interval<T,Policies>& y
  114. );
  115. template <class T, class Policies>
  116. interval<T,Policies>
  117. min BOOST_PREVENT_MACRO_SUBSTITUTION (
  118. const interval<T,Policies>& x
  119. , const interval<T,Policies>& y
  120. );
  121. template <class T, class Policies>
  122. interval<T,Policies>
  123. min BOOST_PREVENT_MACRO_SUBSTITUTION (
  124. const interval<T,Policies>& x
  125. , const T& y
  126. );
  127. template <class T, class Policies>
  128. interval<T,Policies>
  129. min BOOST_PREVENT_MACRO_SUBSTITUTION (
  130. const T& x
  131. , const interval<T,Policies>& y
  132. );
  133. }} // namespace boost::numeric
  134. #endif // include guard