62 static const int n_info = 8192;
97 double decay(
void)
const;
117 double decay(
void)
const;
132 GPI::Block::Block(
void)
133 : next(NULL), free(n_info) {}
137 for (
int i=free;
i < n_info;
i++)
143 GPI::Object::Object(
void)
144 :
b(&fst), invd(1.0), pid(0U), use_cnt(1U) {}
147 GPI::Object::inc(
void) {
154 GPI::Object::fail(Info&
c) {
156 c.afc = invd * (
c.afc + 1.0);
158 for (Block*
i =
b;
i != NULL;
i =
i->next)
164 GPI::Object::decay(
void)
const {
166 const_cast<GPI::Object&>(*this).m.acquire();
168 const_cast<GPI::Object&>(*this).m.release();
173 GPI::Object::decay(
double d) {
180 GPI::Object::allocate(
unsigned int gid) {
184 Block*
n =
new Block;
187 c = &
b->info[--
b->free];
194 GPI::Object::dispose(
void) {
243 return o->allocate(gid);
const double rescale_limit
Rescale action and afc values when larger than this.
A mutex for mutual exclausion among several threads.
Gecode::FloatVal c(-8, 8)
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Global propagator information.
unsigned int pid
Propagator identifier.
Info * allocate(unsigned int gid)
Allocate new actor info.
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
double decay(void) const
Return decay factor.
unsigned int gid
Group identifier.
void init(unsigned int pid, unsigned int gid)
Initialize.
const double rescale
Rescale factor for action and afc values.
void fail(Info &c)
Increment failure count.
Gecode toplevel namespace
Class for storing timed-decay value.
Base class for heap allocated objects.