40 namespace Gecode {
namespace Int {
42 template<
class Char,
class Traits,
class View>
43 std::basic_ostream<Char,Traits>&
44 print_view(std::basic_ostream<Char,Traits>& os,
const View&
x) {
45 std::basic_ostringstream<Char,Traits> s;
46 s.copyfmt(os); s.width(0);
49 }
else if (
x.range()) {
50 s <<
'[' <<
x.min() <<
".." <<
x.max() <<
']';
55 if (
r.min() ==
r.max()) {
58 s <<
r.min() <<
".." <<
r.max();
69 template<
class Char,
class Traits,
class Val,
class UnsVal>
70 std::basic_ostream<Char,Traits>&
73 std::basic_ostringstream<Char,Traits> s;
74 s.copyfmt(os); s.width(0);
81 if (
r.min() ==
r.max()) {
84 s <<
r.min() <<
".." <<
r.max();
95 template<
class Char,
class Traits>
96 inline std::basic_ostream<Char,Traits>&
100 template<
class Char,
class Traits>
101 inline std::basic_ostream<Char,Traits>&
105 template<
class Char,
class Traits>
106 inline std::basic_ostream<Char,Traits>&
110 template<
class Char,
class Traits,
class View>
111 inline std::basic_ostream<Char,Traits>&
117 template<
class Char,
class Traits>
118 inline std::basic_ostream<Char,Traits>&
120 return print_scale<Char,Traits,int,unsigned int>(os,
x);
122 template<
class Char,
class Traits>
123 inline std::basic_ostream<Char,Traits>&
125 return print_scale<Char,Traits,long long int,unsigned long long int>(os,
x);
128 template<
class Char,
class Traits>
129 inline std::basic_ostream<Char,Traits>&
131 return os <<
x.val();
133 template<
class Char,
class Traits>
134 inline std::basic_ostream<Char,Traits>&
140 template<
class Char,
class Traits>
141 std::basic_ostream<Char,Traits>&
147 return os <<
"[0..1]";
149 template<
class Char,
class Traits>
150 std::basic_ostream<Char,Traits>&
156 return os <<
"[0..1]";
Scale integer view (template)
std::basic_ostream< Char, Traits > & print_scale(std::basic_ostream< Char, Traits > &os, const ScaleView< Val, UnsVal > &x)
Range iterator for integer views.
Integer view for integer variables.
Node * x
Pointer to corresponding Boolean expression node.
std::basic_ostream< Char, Traits > & print_view(std::basic_ostream< Char, Traits > &os, const View &x)
Gecode toplevel namespace
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const TaskArray< Task > &t)
Boolean view for Boolean variables.