| 53 | */ |
| 54 | template<class Var> |
| 55 | class VarBranch { |
| 56 | public: |
| 57 | /// Corresponding merit function |
| 58 | typedef typename BranchTraits<Var>::Merit MeritFunction; |
| 59 | protected: |
| 60 | /// Tie-breaking limit function |
| 61 | BranchTbl _tbl; |
| 62 | /// Random number generator |
| 63 | Rnd _rnd; |
| 64 | /// Decay information for AFC and action |
| 65 | double _decay; |
| 66 | /// AFC information |
| 67 | AFC _afc; |
| 68 | /// Action information |
| 69 | Action _act; |
| 70 | /// CHB information |
| 71 | CHB _chb; |
| 72 | /// Merit function |
| 73 | MeritFunction _mf; |
| 74 | public: |
| 75 | /// Initialize |
| 76 | VarBranch(void); |
| 77 | /// Initialize with tie-break limit function \a t |
| 78 | VarBranch(BranchTbl t); |
| 79 | /// Initialize with random number generator \a r |
| 80 | VarBranch(Rnd r); |
| 81 | /// Initialize with decay factor \a d and tie-break limit function \a t |
| 82 | VarBranch(double d, BranchTbl t); |
| 83 | /// Initialize with AFC \a a and tie-break limit function \a t |
| 84 | VarBranch(AFC a, BranchTbl t); |
| 85 | /// Initialize with action \a a and tie-break limit function \a t |
| 86 | VarBranch(Action a, BranchTbl t); |
| 87 | /// Initialize with CHB \a c and tie-break limit function \a t |
| 88 | VarBranch(CHB c, BranchTbl t); |
| 89 | /// Initialize with merit function \a f and tie-break limit function \a t |
| 90 | VarBranch(MeritFunction f, BranchTbl t); |
| 91 | /// Return tie-break limit function |
| 92 | BranchTbl tbl(void) const; |
| 93 | /// Return random number generator |
| 94 | Rnd rnd(void) const; |
| 95 | /// Return decay factor |
| 96 | double decay(void) const; |
| 97 | /// Return AFC |
| 98 | AFC afc(void) const; |
| 99 | /// Set AFC to \a a |
| 100 | void afc(AFC a); |
| 101 | /// Return action |
| 102 | Action action(void) const; |
| 103 | /// Set action to \a a |
| 104 | void action(Action a); |
| 105 | /// Return CHB |
| 106 | CHB chb(void) const; |
| 107 | /// Set CHB to \a chb |
| 108 | void chb(CHB chb); |
| 109 | /// Return merit function |
| 110 | MeritFunction merit(void) const; |
| 111 | }; |
| 112 | |