MCPcopy Create free account
hub / github.com/Gecode/gecode / SetAssign

Class SetAssign

gecode/set.hh:1530–1556  ·  view source on GitHub ↗

* \brief Which value to select for assignment * * \ingroup TaskModelSetBranch */

Source from the content-addressed store, hash-verified

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

Callers 9

SET_ASSIGN_MIN_INCFunction · 0.85
SET_ASSIGN_MIN_EXCFunction · 0.85
SET_ASSIGN_MED_INCFunction · 0.85
SET_ASSIGN_MED_EXCFunction · 0.85
SET_ASSIGN_MAX_INCFunction · 0.85
SET_ASSIGN_MAX_EXCFunction · 0.85
SET_ASSIGN_RND_INCFunction · 0.85
SET_ASSIGN_RND_EXCFunction · 0.85
SET_ASSIGNFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected