MCPcopy Create free account
hub / github.com/Gecode/gecode / printBound

Function printBound

gecode/set/view/print.hpp:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 /// Print bound of a set view or variable
41 template<class Char, class Traits, class I>
42 void
43 printBound(std::basic_ostream<Char,Traits>& s, I& r) {
44 s << '{';
45 while (r()) {
46 if (r.min() == r.max()) {
47 s << r.min();
48 } else if (r.min()+1 == r.max()) {
49 s << r.min() << "," << r.max();
50 } else {
51 s << r.min() << ".." << r.max();
52 }
53 ++r;
54 if (!r()) break;
55 s << ',';
56 }
57 s << '}';
58 }
59
60 /// Print set view
61 template<class Char, class Traits, class IL, class IU>

Callers 2

printFunction · 0.85
print.hppFile · 0.85

Calls 3

rFunction · 0.85
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected