| 50 | |
| 51 | vector<int> assignment; |
| 52 | void listAssignments(Strategy s) { |
| 53 | StrategyNode tag = s.getTag(); |
| 54 | if (s.isTrue()) { |
| 55 | // We are at the end of a branch : we print the assignment) |
| 56 | for (int i=0;i<assignment.size();++i) cout<<assignment[i]<<" "; |
| 57 | cout<<endl; |
| 58 | return; |
| 59 | } |
| 60 | if (assignment.size()<= tag.Vmax) assignment.resize(tag.Vmax + 1); |
| 61 | for (int i=tag.Vmin;i<=tag.Vmax;++i) { |
| 62 | assignment[i] = tag.valeurs[i-(tag.Vmin)]; |
| 63 | } |
| 64 | // recursively extracting each child |
| 65 | for (int i=0;i<s.degree();++i) { |
| 66 | listAssignments(s.getChild(i)); |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | int main() { |
| 71 | int NCustomer = 2; |