38 #ifndef __GECODE_INT_TASK_HH__ 39 #define __GECODE_INT_TASK_HH__ 43 namespace Gecode {
namespace Int {
46 template<
class ManTask>
102 namespace Gecode {
namespace Int {
105 template<
class TaskView>
119 int pmin(
void)
const;
121 int pmax(
void)
const;
143 namespace Gecode {
namespace Int {
151 template<
class TaskView>
165 namespace Gecode {
namespace Int {
190 int size(
void)
const;
198 Task& operator [](
int i);
201 const Task& operator [](
int i)
const;
221 static void*
operator new(size_t);
222 static void operator delete(
void*,size_t);
229 template<
class Char,
class Traits,
class Task>
230 std::basic_ostream<Char,Traits>&
231 operator <<(std::basic_ostream<Char,Traits>& os,
236 template<
class TaskView>
252 int size(
void)
const;
260 TaskView& operator [](
int i);
263 const TaskView& operator [](
int i)
const;
266 static void*
operator new(size_t);
267 static void operator delete(
void*,size_t);
274 template<
class Char,
class Traits,
class TaskView>
275 std::basic_ostream<Char,Traits>&
276 operator <<(std::basic_ostream<Char,Traits>& os,
283 namespace Gecode {
namespace Int {
294 template<
class TaskView, SortTaskOrder sto,
bool inc>
298 template<
class TaskView, SortTaskOrder sto,
bool inc>
302 template<
class TaskView, SortTaskOrder sto,
bool inc>
309 namespace Gecode {
namespace Int {
312 template<
class TaskView, SortTaskOrder sto,
bool inc>
326 bool operator ()(
void)
const;
329 int left(
void)
const;
331 void operator ++(
void);
336 int task(
void)
const;
342 template<
class OptTaskView, SortTaskOrder sto,
bool inc>
356 namespace Gecode {
namespace Int {
362 long long int plus(
long long int x,
long long int y);
365 double plus(
double x,
double y);
368 template<
class TaskView,
class Node>
380 int n_inner(
void)
const;
382 int n_nodes(
void)
const;
384 static bool n_root(
int i);
386 bool n_leaf(
int i)
const;
388 static int n_left(
int i);
390 static bool left(
int i);
392 static int n_right(
int i);
394 static bool right(
int i);
396 static int n_parent(
int i);
401 const Node& root(
void)
const;
419 namespace Gecode {
namespace Int {
427 template<
class Task,
class PL>
442 virtual size_t dispose(
Space& home);
446 template<
class OptTask,
class PL>
450 template<
class OptTask,
class PL,
class Cap>
457 static const bool basic =
true;
459 static const bool advanced =
false;
468 static const bool basic =
false;
470 static const bool advanced =
true;
479 static const bool basic =
true;
481 static const bool advanced =
true;
491 namespace Gecode {
namespace Int {
512 void init(
Type e,
int t,
int i);
514 Type type(
void)
const;
516 int time(
void)
const;
530 template<
class Char,
class Traits>
531 std::basic_ostream<Char,Traits>&
532 operator <<(std::basic_ostream<Char,Traits>& os,
const Event& e);
Sort by earliest completion times.
TaskArray< Task > & t
Access to task array.
unsigned int ei
Combines type and number of task.
Class for defining basic propagation level.
bool excluded(void) const
Whether task is excluded.
void reschedule(Space &home, Propagator &p, PropCond pc)
Schedule propagator p.
SortTaskOrder
How to sort tasks.
void subscribe(Space &home, Propagator &p, PropCond pc)
Subscribe propagator p to task.
int ModEvent
Type for modification events.
Base-class for propagators.
Traits class for mapping tasks to task views.
Sort by earliest start times.
Class for defining advanced propagation level.
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
Gecode::FloatVal c(-8, 8)
Class for defining basic and advanced propagation level.
void sort(TaskViewArray< TaskView > &t)
Sort task view array t according to sto and inc (increasing or decreasing)
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Time-tabling event for task.
TaskViewTraits< TaskView >::Task Task
The underlying task type.
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
int PropCond
Type for propagation conditions.
Allows to iterate over task views according to a specified order.
int plus(int x, int y)
Safe addition in case x is -IntLimits::infinity.
unsigned int size(I &i)
Size of all ranges of range iterator i.
ManToOptTask(void)
Default constructor.
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
Class to define an optional from a mandatory task.
int * _leaf
Map task number to leaf node number in right order.
Sort by latest completion times.
Task mapper: turns a task view into its dual.
Post propagator for SetVar SetOpType SetVar SetRelType r
int * map
Map for iteration order.
Post propagator for SetVar SetOpType SetVar y
bool mandatory(void) const
Whether task is mandatory.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p for task.
Allows to iterate over mandatory task views according to a specified order.
Post propagator for SetVar x
bool optional(void) const
Whether task can still be optional.
Traits class for mapping task views to tasks.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
bool operator<(const FloatVal &x, const FloatVal &y)
Int::BoolView _m
Boolean view whether task is mandatory (= 1) or not.
Gecode toplevel namespace
const TaskViewArray< TaskView > & tasks
The tasks from which the tree is computed.
void update(Space &home, bool share, ManToOptTask &t)
Update this task to be a clone of task t.
TaskArray< Task > t
Tasks.
Sort by latest start times.
int ModEventDelta
Modification event deltas.
Home class for posting propagators
Task trees for task views with node type Node.
Type
Event type for task with order in which they are processed.
ExecStatus purge(Space &home, Propagator &p, TaskArray< OptTask > &t)
Purge optional tasks that are excluded and possibly rewrite propagator.
bool assigned(void) const
Test whether task is assigned.
Boolean view for Boolean variables.