inline void push(int numNodes, CoinTreeNode** nodes,
		     const bool incrInserted = true) {
	CoinTreeSiblings* s = new CoinTreeSiblings(numNodes, nodes);
	realpush(s);
	if (incrInserted) {
	    numInserted_ += numNodes;
	}
	size_ += numNodes;
    }
    inline void push(const CoinTreeSiblings& sib,
		     const bool incrInserted = true) {
	CoinTreeSiblings* s = new CoinTreeSiblings(sib);
#ifdef DEBUG_PRINT
	s->printPref();
#endif
	realpush(s);
	if (incrInserted) {
	    numInserted_ += sib.toProcess();
	}
	size_ += sib.toProcess();
    }
Example #3
0
// Add a node to the heap
void
CbcTree::push(CbcNode * x)
{
    x->setNodeNumber(maximumNodeNumber_);
    maximumNodeNumber_++;
    /*printf("push obj %g, refcount %d, left %d, pointing to %d\n",
       x->objectiveValue(),x->nodeInfo()->decrement(0),
       x->nodeInfo()->numberBranchesLeft(),x->nodeInfo()->numberPointingToThis());*/
    assert(x->objectiveValue() != COIN_DBL_MAX && x->nodeInfo());
#ifdef JJF_ZERO
    nodes_.push_back(x);
    push_heap(nodes_.begin(), nodes_.end(), comparison_);
#else
realpush(x);
#endif
}