Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
old_macaon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Franck Dary
old_macaon
Commits
fa69635b
Commit
fa69635b
authored
5 years ago
by
Franck Dary
Browse files
Options
Downloads
Patches
Plain Diff
Removed mvt from transitions
parent
f97310f3
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
transition_machine/include/TransitionMachine.hpp
+1
-4
1 addition, 4 deletions
transition_machine/include/TransitionMachine.hpp
transition_machine/src/TransitionMachine.cpp
+3
-6
3 additions, 6 deletions
transition_machine/src/TransitionMachine.cpp
with
4 additions
and
10 deletions
transition_machine/include/TransitionMachine.hpp
+
1
−
4
View file @
fa69635b
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
transition_machine/src/TransitionMachine.cpp
+
3
−
6
View file @
fa69635b
...
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment