Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Translate.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <string/LinearString.h>
9
10#include "Run.h"
11#include <automaton/PDA/NPDTA.h>
12
13#include <alib/deque>
14#include <alib/set>
15
16namespace automaton {
17
18namespace run {
19
24class Translate {
25public:
39 template < class InputSymbolType, class OutputSymbolType, class PushdownStoreSymbolType, class StateType >
41
42};
43
44template < class InputSymbolType, class OutputSymbolType, class PushdownStoreSymbolType, class StateType >
48
49 for ( const auto & resItem : res ) {
50 const ext::deque < OutputSymbolType > & rawString = std::get < 3 > ( resItem );
51 strings . insert ( string::LinearString < OutputSymbolType > ( ext::vector < OutputSymbolType > ( rawString.begin ( ), rawString.end ( ) ) ) );
52 }
53
54 return strings;
55}
56
57} /* namespace run */
58
59} /* namespace automaton */
60
Definition: NPDTA.h:75
Implementation of transducer run over its input.
Definition: Translate.h:24
static ext::set< string::LinearString< OutputSymbolType > > translate(const automaton::NPDTA< InputSymbolType, OutputSymbolType, PushdownStoreSymbolType, StateType > &automaton, const string::LinearString< InputSymbolType > &string)
Definition: Translate.h:45
Class extending the deque class from the standard library. Original reason is to allow printing of th...
Definition: deque.hpp:44
auto begin() &
Inherited behavior of begin for non-const instance.
Definition: deque.hpp:100
auto end() &
Inherited behavior of end for non-const instance.
Definition: deque.hpp:130
Definition: set.hpp:44
Class extending the vector class from the standard library. Original reason is to allow printing of t...
Definition: vector.hpp:45
Linear string.
Definition: LinearString.h:57
return res
Definition: MinimizeByPartitioning.h:145
Definition: ToGrammar.h:31