6 #ifndef CoinSearchTree_H
7 #define CoinSearchTree_H
29 void set(
unsigned int bits[4]);
32 std::string
str()
const;
140 printf(
"prefs of sibligs: sibling[%i]: %s\n", i, pref.c_str());
153 static inline const char*
name() {
return "CoinSearchTreeComparePreferred"; }
163 }
else if (yPref < xPref) {
169 printf(
"Comparing xpref (%s) and ypref (%s) : %s\n",
170 xpref.str().c_str(), ypref.str().c_str(), retval ?
"T" :
"F");
179 static inline const char*
name() {
return "CoinSearchTreeCompareDepth"; }
198 static inline const char*
name() {
return "CoinSearchTreeCompareBreadth"; }
208 static inline const char*
name() {
return "CoinSearchTreeCompareBest"; }
233 virtual void fixTop() = 0;
237 virtual const char*
compName()
const = 0;
251 candidateList_.front()->currentNode()->getPreferred().print(output);
252 printf(
"top's pref: %s\n", output);
270 const bool incrInserted =
true) {
279 const bool incrInserted =
true) {
295 #ifdef CAN_TRUST_STL_HEAP
297 template <
class Comp>
325 const char*
compName()
const {
return Comp::name(); }
330 template <
class Comp>
351 for (ch = 2; ch <
size; pos = ch, ch *= 2) {
352 if (
comp_(candidates[ch+1], candidates[ch]))
354 if (
comp_(s, candidates[ch]))
356 candidates[pos] = candidates[ch];
359 if (
comp_(candidates[ch], s)) {
360 candidates[pos] = candidates[ch];
373 for (ch = pos/2; ch != 0; pos = ch, ch /= 2) {
374 if (
comp_(candidates[ch], s))
376 candidates[pos] = candidates[ch];
391 const char*
compName()
const {
return Comp::name(); }
449 const bool incrInserted =
true) {