| 679 | template<class View, class Val, class Degree, class StateIdx> |
| 680 | template<class Var> |
| 681 | ExecStatus |
| 682 | LayeredGraph<View,Val,Degree,StateIdx>::post(Home home, |
| 683 | const VarArgArray<Var>& x, |
| 684 | const DFA& dfa) { |
| 685 | if (x.size() == 0) { |
| 686 | // Check whether the start state 0 is also a final state |
| 687 | if ((dfa.final_fst() <= 0) && (dfa.final_lst() >= 0)) |
| 688 | return ES_OK; |
| 689 | return ES_FAILED; |
| 690 | } |
| 691 | assert(x.size() > 0); |
| 692 | for (int i=0; i<x.size(); i++) { |
| 693 | DFA::Symbols s(dfa); |
| 694 | typename VarTraits<Var>::View xi(x[i]); |
| 695 | GECODE_ME_CHECK(xi.inter_v(home,s,false)); |
| 696 | } |
| 697 | LayeredGraph<View,Val,Degree,StateIdx>* p = |
| 698 | new (home) LayeredGraph<View,Val,Degree,StateIdx>(home,x,dfa); |
| 699 | return p->initialize(home,x,dfa); |
| 700 | } |
| 701 | |
| 702 | template<class View, class Val, class Degree, class StateIdx> |
| 703 | forceinline |
nothing calls this directly
no test coverage detected