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

Method print

gecode/int/branch/view-values.hpp:164–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162
163 template<int n, bool min, class Filter, class Print>
164 void
165 ViewValuesBrancher<n,min,Filter,Print>::print(const Space& home,
166 const Choice& c,
167 unsigned int a,
168 std::ostream& o) const {
169 const PosValuesChoice& pvc
170 = static_cast<const PosValuesChoice&>(c);
171 IntView x(ViewBrancher<IntView,Filter,n>::view(pvc.pos()));
172 unsigned int b = min ? a : (pvc.alternatives() - 1 - a);
173 int nn = pvc.val(b);
174 if (p)
175 p(home,*this,a,x,pvc.pos().pos,nn,o);
176 else
177 o << "var[" << pvc.pos().pos << "] = " << nn;
178 }
179
180 template<int n, bool min, class Filter, class Print>
181 forceinline size_t

Callers

nothing calls this directly

Calls 4

alternativesMethod · 0.80
pFunction · 0.50
posMethod · 0.45
valMethod · 0.45

Tested by

no test coverage detected