diff --git a/transition_machine/include/TransitionMachine.hpp b/transition_machine/include/TransitionMachine.hpp index d273603a77cc22aa416d198bda697acf6d159525..37c9328411015b824cb965d04168cf1bae1e77a1 100644 --- a/transition_machine/include/TransitionMachine.hpp +++ b/transition_machine/include/TransitionMachine.hpp @@ -27,15 +27,12 @@ class TransitionMachine std::string dest; /// @brief The prefix of the Action name that will trigger the choice of this Transition. std::string actionPrefix; - /// @brief The relative movement that will be applied to the Config head when taking this transition. - int headMvt; /// @brief Construct a new Transition. /// /// @param dest The other end of the Transition. /// @param prefix The prefix of the Action name that will trigger the choice of this Transition. - /// @param mvt The relative movement that will be applied to the Config head when taking this transition. - Transition(const std::string & dest, const std::string & prefix, int mvt); + Transition(const std::string & dest, const std::string & prefix); }; /// @brief A State of the TransitionMachine. Can be seen as a graph node. diff --git a/transition_machine/src/TransitionMachine.cpp b/transition_machine/src/TransitionMachine.cpp index b61c1ea248e8f6476e6f5f5eba061125957847c4..c7cebf66ff7206504047b671bec01b7b8e10d01c 100644 --- a/transition_machine/src/TransitionMachine.cpp +++ b/transition_machine/src/TransitionMachine.cpp @@ -80,9 +80,7 @@ TransitionMachine::TransitionMachine(bool trainMode) if(buffer != std::string("TRANSITIONS")) badFormatAndAbort(ERRINFO); - // Reading all transitions - int mvt; - while(fscanf(fd, "%s %s %d %[^\n]\n", buffer, buffer2, &mvt, buffer3) == 4) + while(fscanf(fd, "%s %s %[^\n]\n", buffer, buffer2, buffer3) == 3) { std::string src(buffer); std::string dest(buffer2); @@ -96,7 +94,7 @@ TransitionMachine::TransitionMachine(bool trainMode) State * srcState = str2state[src].get(); - srcState->transitions.emplace_back(dest, prefix, mvt); + srcState->transitions.emplace_back(dest, prefix); } } @@ -106,11 +104,10 @@ TransitionMachine::State::State(const std::string & name, const std::string & cl this->classifier = classifier; } -TransitionMachine::Transition::Transition(const std::string & dest, const std::string & prefix, int mvt) +TransitionMachine::Transition::Transition(const std::string & dest, const std::string & prefix) { this->dest = dest; this->actionPrefix = prefix; - this->headMvt = mvt; } std::string & TransitionMachine::getCurrentState()