43 namespace Gecode {
namespace Gist {
47 assert(getTag() == UNDET);
53 childrenOrFirstChild =
54 reinterpret_cast<void*
>(na.allocate(
getIndex(na)) << 2);
61 childrenOrFirstChild =
62 reinterpret_cast<void*
>(na.allocate(idx) << 2);
63 noOfChildren = -na.allocate(idx);
72 childrenOrFirstChild =
static_cast<void*
>(children);
73 setTag(MORE_CHILDREN);
74 for (
unsigned int i=n;
i--;)
75 children[
i] = na.allocate(idx);
Heap heap
The single global heap.
T * alloc(long unsigned int n)
Allocate block of n objects of type T from heap.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
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.
Gecode toplevel namespace