* \brief Which values to select for branching first * * \ingroup TaskModelIntBranch */
| 4999 | * \ingroup TaskModelIntBranch |
| 5000 | */ |
| 5001 | class IntValBranch : public ValBranch<IntVar> { |
| 5002 | public: |
| 5003 | /// Which value selection |
| 5004 | enum Select { |
| 5005 | SEL_MIN, ///< Select smallest value |
| 5006 | SEL_MED, ///< Select greatest value not greater than the median |
| 5007 | SEL_MAX, ///< Select largest value |
| 5008 | SEL_RND, ///< Select random value |
| 5009 | SEL_SPLIT_MIN, ///< Select values not greater than mean of smallest and largest value |
| 5010 | SEL_SPLIT_MAX, ///< Select values greater than mean of smallest and largest value |
| 5011 | SEL_RANGE_MIN, ///< Select the smallest range of the variable domain if it has several ranges, otherwise select values not greater than mean of smallest and largest value |
| 5012 | SEL_RANGE_MAX, ///< Select the largest range of the variable domain if it has several ranges, otherwise select values greater than mean of smallest and largest value |
| 5013 | SEL_VAL_COMMIT, ///< Select value according to user-defined functions |
| 5014 | SEL_VALUES_MIN, ///< Select all values starting from smallest |
| 5015 | SEL_VALUES_MAX ///< Select all values starting from largest |
| 5016 | }; |
| 5017 | protected: |
| 5018 | /// Which value to select |
| 5019 | Select s; |
| 5020 | public: |
| 5021 | /// Initialize with selection strategy \a s |
| 5022 | IntValBranch(Select s = SEL_MIN); |
| 5023 | /// Initialize with random number generator \a r |
| 5024 | IntValBranch(Rnd r); |
| 5025 | /// Initialize with value function \a f and commit function \a c |
| 5026 | IntValBranch(IntBranchVal v, IntBranchCommit c); |
| 5027 | /// Return selection strategy |
| 5028 | Select select(void) const; |
| 5029 | }; |
| 5030 | |
| 5031 | /** |
| 5032 | * \brief Which values to select for branching first |
no outgoing calls
no test coverage detected