* \brief Which value to select for assignment * * \ingroup TaskModelSetBranch */
| 1528 | * \ingroup TaskModelSetBranch |
| 1529 | */ |
| 1530 | class SetAssign : public ValBranch<SetVar> { |
| 1531 | public: |
| 1532 | /// Which value selection |
| 1533 | enum Select { |
| 1534 | SEL_MIN_INC, ///< Include smallest element |
| 1535 | SEL_MIN_EXC, ///< Exclude smallest element |
| 1536 | SEL_MED_INC, ///< Include median element (rounding downwards) |
| 1537 | SEL_MED_EXC, ///< Exclude median element (rounding downwards) |
| 1538 | SEL_MAX_INC, ///< Include largest element |
| 1539 | SEL_MAX_EXC, ///< Exclude largest element |
| 1540 | SEL_RND_INC, ///< Include random element |
| 1541 | SEL_RND_EXC, ///< Exclude random element |
| 1542 | SEL_VAL_COMMIT ///< Select value according to user-defined functions |
| 1543 | }; |
| 1544 | protected: |
| 1545 | /// Which value to select |
| 1546 | Select s; |
| 1547 | public: |
| 1548 | /// Initialize with selection strategy \a s |
| 1549 | SetAssign(Select s = SEL_MIN_INC); |
| 1550 | /// Initialize with random number generator \a r |
| 1551 | SetAssign(Select s, Rnd r); |
| 1552 | /// Initialize with value function \a f and commit function \a c |
| 1553 | SetAssign(SetBranchVal v, SetBranchCommit c); |
| 1554 | /// Return selection strategy |
| 1555 | Select select(void) const; |
| 1556 | }; |
| 1557 | |
| 1558 | /** |
| 1559 | * \defgroup TaskModelSetBranchAssign Assigning set variables |
no outgoing calls
no test coverage detected