% Transform a TupleSet into a DFA
| 374 | |
| 375 | ///% Transform a TupleSet into a DFA |
| 376 | Gecode::DFA tupleset2dfa(Gecode::TupleSet ts) { |
| 377 | using namespace Gecode; |
| 378 | REG expression; |
| 379 | for (int i = 0; i<ts.tuples(); i++) { |
| 380 | REG r; |
| 381 | for (int j = 0; j<ts.arity(); j++) { |
| 382 | r += REG(ts[i][j]); |
| 383 | } |
| 384 | expression |= r; |
| 385 | } |
| 386 | DFA dfa(expression); |
| 387 | return dfa; |
| 388 | } |
| 389 | |
| 390 | /// %Test with tuple set |
| 391 | class TupleSetBase : public Test { |