MCPcopy Create free account
hub / github.com/Gecode/gecode / post

Method post

gecode/int/extensional/layered-graph.hpp:681–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

final_fstMethod · 0.80
final_lstMethod · 0.80
sizeMethod · 0.45
inter_vMethod · 0.45
initializeMethod · 0.45

Tested by

no test coverage detected