36namespace Gecode {
namespace Int {
38 template<
class Char,
class Traits,
class View>
39 std::basic_ostream<Char,Traits>&
40 print_view(std::basic_ostream<Char,Traits>& os,
const View&
x) {
41 std::basic_ostringstream<Char,Traits> s;
42 s.copyfmt(os); s.width(0);
45 }
else if (
x.range()) {
46 s <<
'[' <<
x.min() <<
".." <<
x.max() <<
']';
51 if (
r.min() ==
r.max()) {
54 s <<
r.min() <<
".." <<
r.max();
65 template<
class Char,
class Traits,
class Val,
class UnsVal>
66 std::basic_ostream<Char,Traits>&
69 std::basic_ostringstream<Char,Traits> s;
70 s.copyfmt(os); s.width(0);
77 if (
r.min() ==
r.max()) {
80 s <<
r.min() <<
".." <<
r.max();
91 template<
class Char,
class Traits>
92 inline std::basic_ostream<Char,Traits>&
96 template<
class Char,
class Traits>
97 inline std::basic_ostream<Char,Traits>&
101 template<
class Char,
class Traits>
102 inline std::basic_ostream<Char,Traits>&
103 operator <<(std::basic_ostream<Char,Traits>& os,
const OffsetView&
x) {
106 template<
class Char,
class Traits,
class View>
107 inline std::basic_ostream<Char,Traits>&
109 const CachedView<View>&
x) {
113 template<
class Char,
class Traits>
114 inline std::basic_ostream<Char,Traits>&
115 operator <<(std::basic_ostream<Char,Traits>& os,
const IntScaleView&
x) {
118 template<
class Char,
class Traits>
119 inline std::basic_ostream<Char,Traits>&
120 operator <<(std::basic_ostream<Char,Traits>& os,
const LLongScaleView&
x) {
124 template<
class Char,
class Traits>
125 inline std::basic_ostream<Char,Traits>&
126 operator <<(std::basic_ostream<Char,Traits>& os,
const ConstIntView&
x) {
127 return os <<
x.val();
129 template<
class Char,
class Traits>
130 inline std::basic_ostream<Char,Traits>&
131 operator <<(std::basic_ostream<Char,Traits>& os,
const ZeroIntView&) {
136 template<
class Char,
class Traits>
137 std::basic_ostream<Char,Traits>&
138 operator <<(std::basic_ostream<Char,Traits>& os,
const BoolView&
x) {
143 return os <<
"[0..1]";
145 template<
class Char,
class Traits>
146 std::basic_ostream<Char,Traits>&
147 operator <<(std::basic_ostream<Char,Traits>& os,
const NegBoolView&
x) {
152 return os <<
"[0..1]";
Integer view for integer variables.
Scale integer view (template)
Range iterator for integer views.
bool assigned(void) const
Test whether view is assigned.
std::basic_ostream< Char, Traits > & print_view(std::basic_ostream< Char, Traits > &os, const View &x)
std::basic_ostream< Char, Traits > & print_scale(std::basic_ostream< Char, Traits > &os, const ScaleView< Val, UnsVal > &x)
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const IdxViewArray< View > &x)
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
Post propagator for SetVar x