test_intervals.cxx
Go to the documentation of this file.
1 
2 #include <boost/numeric/interval.hpp>
3 #include <iostream>
4 
5 template<class T, class Policies>
6 std::ostream &operator<<(std::ostream &os,
7  const boost::numeric::interval<T, Policies> &x) {
8  os << "[" << x.lower() << ", " << x.upper() << "]";
9  return os;
10 }
11 
12 using namespace std;
13 int main () {
14 
15  typedef boost::numeric::interval<double> I;
16  I a = 42.0, b{5.0, 7.0};
17  I c = a/b;
18 
19  cout << a << " / " << b << " = " << c << endl;
20 
21  return 0;
22 }
QDataStream & operator<<(QDataStream &s, const QString &str)
Definition: qstring.cpp:15066
STL namespace.
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124
static bool * b
Definition: config.cpp:1043
int main()
list x
Definition: train.py:276
QTextStream & endl(QTextStream &s)