Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/numeric/interval/compare/set.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /* Boost interval/compare/set.hpp template implementation file
0002  *
0003  * Copyright 2002-2003 Guillaume Melquiond
0004  *
0005  * Distributed under the Boost Software License, Version 1.0.
0006  * (See accompanying file LICENSE_1_0.txt or
0007  * copy at http://www.boost.org/LICENSE_1_0.txt)
0008  */
0009 
0010 #ifndef BOOST_NUMERIC_INTERVAL_COMPARE_SET_HPP
0011 #define BOOST_NUMERIC_INTERVAL_COMPARE_SET_HPP
0012 
0013 #include <boost/numeric/interval/detail/interval_prototype.hpp>
0014 #include <boost/numeric/interval/detail/test_input.hpp>
0015 #include <boost/numeric/interval/utility.hpp>
0016 
0017 namespace boost {
0018 namespace numeric {
0019 namespace interval_lib {
0020 namespace compare {
0021 namespace set {
0022 
0023 template<class T, class Policies1, class Policies2> inline
0024 bool operator<(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
0025 {
0026   return proper_subset(x, y);
0027 }
0028 
0029 template<class T, class Policies> inline
0030 bool operator<(const interval<T, Policies>& , const T& )
0031 {
0032   throw comparison_error();
0033 }
0034 
0035 template<class T, class Policies1, class Policies2> inline
0036 bool operator<=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
0037 {
0038   return subset(x, y);
0039 }
0040 
0041 template<class T, class Policies> inline
0042 bool operator<=(const interval<T, Policies>& , const T& )
0043 {
0044   throw comparison_error();
0045 }
0046 
0047 template<class T, class Policies1, class Policies2> inline
0048 bool operator>(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
0049 {
0050   return proper_subset(y, x);
0051 }
0052 
0053 template<class T, class Policies> inline
0054 bool operator>(const interval<T, Policies>& , const T& )
0055 {
0056   throw comparison_error();
0057 }
0058 
0059 template<class T, class Policies1, class Policies2> inline
0060 bool operator>=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
0061 {
0062   return subset(y, x);
0063 }
0064 
0065 template<class T, class Policies> inline
0066 bool operator>=(const interval<T, Policies>& , const T& )
0067 {
0068   throw comparison_error();
0069 }
0070 
0071 template<class T, class Policies1, class Policies2> inline
0072 bool operator==(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
0073 {
0074   return equal(y, x);
0075 }
0076 
0077 template<class T, class Policies> inline
0078 bool operator==(const interval<T, Policies>& , const T& )
0079 {
0080   throw comparison_error();
0081 }
0082 
0083 template<class T, class Policies1, class Policies2> inline
0084 bool operator!=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
0085 {
0086   return !equal(y, x);
0087 }
0088 
0089 template<class T, class Policies> inline
0090 bool operator!=(const interval<T, Policies>& , const T& )
0091 {
0092   throw comparison_error();
0093 }
0094 
0095 } // namespace set
0096 } // namespace compare
0097 } // namespace interval_lib
0098 } // namespace numeric
0099 } // namespace boost
0100 
0101 #endif // BOOST_NUMERIC_INTERVAL_COMPARE_SET_HPP