* \brief Recording actions for Boolean variables * * \ingroup TaskModelIntBranch */
| 4546 | * \ingroup TaskModelIntBranch |
| 4547 | */ |
| 4548 | class BoolAction : public Action { |
| 4549 | public: |
| 4550 | /** |
| 4551 | * \brief Construct as not yet initialized |
| 4552 | * |
| 4553 | * The only member functions that can be used on a constructed but not |
| 4554 | * yet initialized action storage is init or the assignment operator. |
| 4555 | * |
| 4556 | */ |
| 4557 | BoolAction(void); |
| 4558 | /// Copy constructor |
| 4559 | BoolAction(const BoolAction& a); |
| 4560 | /// Assignment operator |
| 4561 | BoolAction& operator =(const BoolAction& a); |
| 4562 | /** |
| 4563 | * \brief Initialize for Boolean variables \a x with decay factor \a d |
| 4564 | * |
| 4565 | * Counts propagation if \a p is true and failure if \a f is true. |
| 4566 | * |
| 4567 | * If the branch merit function \a bm is different from nullptr, the |
| 4568 | * action for each variable is initialized with the merit returned |
| 4569 | * by \a bm. |
| 4570 | */ |
| 4571 | GECODE_INT_EXPORT |
| 4572 | BoolAction(Home home, const BoolVarArgs& x, double d=1.0, |
| 4573 | bool p=true, bool f=true, |
| 4574 | BoolBranchMerit bm=nullptr); |
| 4575 | /** |
| 4576 | * \brief Initialize for Boolean variables \a x with decay factor \a d |
| 4577 | * |
| 4578 | * Counts propagation if \a p is true and failure if \a f is true. |
| 4579 | * |
| 4580 | * If the branch merit function \a bm is different from nullptr, the |
| 4581 | * action for each variable is initialized with the merit returned |
| 4582 | * by \a bm. |
| 4583 | * |
| 4584 | * This member function can only be used once and only if the |
| 4585 | * action storage has been constructed with the default constructor. |
| 4586 | * |
| 4587 | */ |
| 4588 | GECODE_INT_EXPORT void |
| 4589 | init(Home home, const BoolVarArgs& x, double d=1.0, |
| 4590 | bool p=true, bool f=true, |
| 4591 | BoolBranchMerit bm=nullptr); |
| 4592 | }; |
| 4593 | |
| 4594 | } |
| 4595 |