Skip to content
Snippets Groups Projects
Commit d536a34e authored by Franck Dary's avatar Franck Dary
Browse files

Added special columns STACK_SIZE et STACK_DIST

parent 72d8d396
No related branches found
No related tags found
No related merge requests found
...@@ -99,6 +99,23 @@ Transition::Transition(const std::string & name) ...@@ -99,6 +99,23 @@ Transition::Transition(const std::string & name)
void Transition::apply(Config & config, float entropy) void Transition::apply(Config & config, float entropy)
{ {
if (config.hasColIndex("STACK_SIZE"))
{
auto & curValue = config.get("STACK_SIZE", config.getWordIndex(), 0);
if (curValue.get().empty())
curValue = fmt::format("{}", config.getStackSize());
}
if (config.hasColIndex("STACK_DIST"))
{
auto & curValue = config.get("STACK_DIST", config.getWordIndex(), 0);
if (curValue.get().empty())
{
if (config.hasStack(0) and config.hasStack(1))
curValue = fmt::format("{}", config.getStack(0) - config.getStack(1));
else
curValue = fmt::format("_");
}
}
if (config.hasColIndex("ENTROPY")) if (config.hasColIndex("ENTROPY"))
{ {
bool mean = true; bool mean = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment