* \brief Recording actions for float variables * * \ingroup TaskModelFloatBranch */
| 1560 | * \ingroup TaskModelFloatBranch |
| 1561 | */ |
| 1562 | class FloatAction : public Action { |
| 1563 | public: |
| 1564 | /** |
| 1565 | * \brief Construct as not yet initialized |
| 1566 | * |
| 1567 | * The only member functions that can be used on a constructed but not |
| 1568 | * yet initialized action storage is init or the assignment operator. |
| 1569 | * |
| 1570 | */ |
| 1571 | FloatAction(void); |
| 1572 | /// Copy constructor |
| 1573 | FloatAction(const FloatAction& a); |
| 1574 | /// Assignment operator |
| 1575 | FloatAction& operator =(const FloatAction& a); |
| 1576 | /** |
| 1577 | * \brief Initialize for float variables \a x with decay factor \a d |
| 1578 | * |
| 1579 | * Counts propagation if \a p is true and failure if \a f is true. |
| 1580 | * |
| 1581 | * If the branch merit function \a bm is different from nullptr, the |
| 1582 | * action for each variable is initialized with the merit returned |
| 1583 | * by \a bm. |
| 1584 | * |
| 1585 | */ |
| 1586 | GECODE_FLOAT_EXPORT |
| 1587 | FloatAction(Home home, const FloatVarArgs& x, double d=1.0, |
| 1588 | bool p=true, bool f=true, |
| 1589 | FloatBranchMerit bm=nullptr); |
| 1590 | /** |
| 1591 | * \brief Initialize for float variables \a x with decay factor \a d |
| 1592 | * |
| 1593 | * Counts propagation if \a p is true and failure if \a f is true. |
| 1594 | * |
| 1595 | * If the branch merit function \a bm is different from nullptr, the |
| 1596 | * action for each variable is initialized with the merit returned |
| 1597 | * by \a bm. |
| 1598 | * |
| 1599 | * This member function can only be used once and only if the |
| 1600 | * action storage has been constructed with the default constructor. |
| 1601 | * |
| 1602 | */ |
| 1603 | GECODE_FLOAT_EXPORT void |
| 1604 | init(Home home, const FloatVarArgs& x, double d=1.0, |
| 1605 | bool p=true, bool f=true, |
| 1606 | FloatBranchMerit bm=nullptr); |
| 1607 | }; |
| 1608 | |
| 1609 | } |
| 1610 |