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

Class SetVarBranch

gecode/set.hh:1309–1364  ·  view source on GitHub ↗

* \brief Which variable to select for branching * * \ingroup TaskModelSetBranch */

Source from the content-addressed store, hash-verified

1307 * \ingroup TaskModelSetBranch
1308 */
1309 class SetVarBranch : public VarBranch<SetVar> {
1310 public:
1311 /// Which variable selection
1312 enum Select {
1313 SEL_NONE = 0, ///< First unassigned
1314 SEL_RND, ///< Random (uniform, for tie breaking)
1315 SEL_MERIT_MIN, ///< With least merit
1316 SEL_MERIT_MAX, ///< With highest merit
1317 SEL_DEGREE_MIN, ///< With smallest degree
1318 SEL_DEGREE_MAX, ///< With largest degree
1319 SEL_AFC_MIN, ///< With smallest accumulated failure count
1320 SEL_AFC_MAX, ///< With largest accumulated failure count
1321 SEL_ACTION_MIN, ///< With lowest action
1322 SEL_ACTION_MAX, ///< With highest action
1323 SEL_CHB_MIN, ///< With lowest CHB Q-score
1324 SEL_CHB_MAX, ///< With highest CHB Q-score
1325 SEL_MIN_MIN, ///< With smallest minimum unknown element
1326 SEL_MIN_MAX, ///< With largest minimum unknown element
1327 SEL_MAX_MIN, ///< With smallest maximum unknown element
1328 SEL_MAX_MAX, ///< With largest maximum unknown element
1329 SEL_SIZE_MIN, ///< With smallest unknown set
1330 SEL_SIZE_MAX, ///< With largest unknown set
1331 SEL_DEGREE_SIZE_MIN, ///< With smallest degree divided by domain size
1332 SEL_DEGREE_SIZE_MAX, ///< With largest degree divided by domain size
1333 SEL_AFC_SIZE_MIN, ///< With smallest accumulated failure count divided by domain size
1334 SEL_AFC_SIZE_MAX, ///< With largest accumulated failure count divided by domain size
1335 SEL_ACTION_SIZE_MIN, ///< With smallest action divided by domain size
1336 SEL_ACTION_SIZE_MAX, ///< With largest action divided by domain size
1337 SEL_CHB_SIZE_MIN, ///< With smallest CHB Q-score divided by domain size
1338 SEL_CHB_SIZE_MAX ///< With largest CHB Q-score divided by domain size
1339 };
1340 protected:
1341 /// Which variable to select
1342 Select s;
1343 public:
1344 /// Initialize with strategy SEL_NONE
1345 SetVarBranch(void);
1346 /// Initialize with random number generator \a r
1347 SetVarBranch(Rnd r);
1348 /// Initialize with selection strategy \a s and tie-break limit function \a t
1349 SetVarBranch(Select s, BranchTbl t);
1350 /// Initialize with selection strategy \a s, decay factor \a d, and tie-break limit function \a t
1351 SetVarBranch(Select s, double d, BranchTbl t);
1352 /// Initialize with selection strategy \a s, afc \a a, and tie-break limit function \a t
1353 SetVarBranch(Select s, SetAFC a, BranchTbl t);
1354 /// Initialize with selection strategy \a s, action \a a, and tie-break limit function \a t
1355 SetVarBranch(Select s, SetAction a, BranchTbl t);
1356 /// Initialize with selection strategy \a s, CHB \a c, and tie-break limit function \a t
1357 SetVarBranch(Select s, SetCHB c, BranchTbl t);
1358 /// Initialize with selection strategy \a s, branch merit function \a mf, and tie-break limit function \a t
1359 SetVarBranch(Select s, SetBranchMerit mf, BranchTbl t);
1360 /// Return selection strategy
1361 Select select(void) const;
1362 /// Expand AFC, action, and CHB
1363 void expand(Home home, const SetVarArgs& x);
1364 };
1365
1366 /**

Callers 15

SET_VAR_NONEFunction · 0.85
SET_VAR_RNDFunction · 0.85
SET_VAR_MERIT_MINFunction · 0.85
SET_VAR_MERIT_MAXFunction · 0.85
SET_VAR_DEGREE_MINFunction · 0.85
SET_VAR_DEGREE_MAXFunction · 0.85
SET_VAR_AFC_MINFunction · 0.85
SET_VAR_AFC_MAXFunction · 0.85
SET_VAR_ACTION_MINFunction · 0.85
SET_VAR_ACTION_MAXFunction · 0.85
SET_VAR_CHB_MINFunction · 0.85
SET_VAR_CHB_MAXFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected