43 assert(getTag() == UNDET);
49 childrenOrFirstChild =
50 reinterpret_cast<void*
>(
51 static_cast<ptrdiff_t
>(na.allocate(
getIndex(na)) << 2));
58 childrenOrFirstChild =
59 reinterpret_cast<void*
>(
60 static_cast<ptrdiff_t
>(na.allocate(idx) << 2));
61 noOfChildren = -na.allocate(idx);
69 int* children =
heap.alloc<
int>(n);
70 childrenOrFirstChild =
static_cast<void*
>(children);
71 setTag(MORE_CHILDREN);
72 for (
unsigned int i=n; i--;)
73 children[i] = na.allocate(idx);
NodeAllocatorBase< VisualNode > NodeAllocator
void setNumberOfChildren(unsigned int n, NodeAllocator &na)
Set the number of children to n and initialize children.
int getIndex(const NodeAllocator &na) const
Return index of this node.
Heap heap
The single global heap.
The Gecode Interactive Search Tool.
Gecode toplevel namespace