mirror of
https://github.com/Jaxan/hybrid-ads.git
synced 2025-04-28 07:27:45 +02:00
Replaces auto return type with concrete types :(
This commit is contained in:
parent
64b2331672
commit
fd750e4abd
3 changed files with 5 additions and 5 deletions
|
@ -29,7 +29,7 @@ struct mealy {
|
||||||
size_t output_size = 0;
|
size_t output_size = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline auto is_complete(const mealy & m){
|
inline bool is_complete(const mealy & m){
|
||||||
for(state n = 0; n < m.graph_size; ++n){
|
for(state n = 0; n < m.graph_size; ++n){
|
||||||
if(m.graph[n].size() != m.input_size) return false;
|
if(m.graph[n].size() != m.input_size) return false;
|
||||||
for(auto && e : m.graph[n]) if(e.to == state(-1) || e.output == output(-1)) return false;
|
for(auto && e : m.graph[n]) if(e.to == state(-1) || e.output == output(-1)) return false;
|
||||||
|
@ -37,12 +37,12 @@ inline auto is_complete(const mealy & m){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline auto apply(mealy const & m, state state, input input){
|
inline mealy::edge apply(mealy const & m, state state, input input){
|
||||||
return m.graph[state][input];
|
return m.graph[state][input];
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Iterator>
|
template <typename Iterator>
|
||||||
auto apply(mealy const & m, state state, Iterator b, Iterator e){
|
mealy::edge apply(mealy const & m, state state, Iterator b, Iterator e){
|
||||||
mealy::edge ret;
|
mealy::edge ret;
|
||||||
ret.to = state;
|
ret.to = state;
|
||||||
while(b != e){
|
while(b != e){
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
template <typename Iterator, typename Fun>
|
template <typename Iterator, typename Fun>
|
||||||
auto partition_(Iterator b, Iterator e, Fun && function, size_t output_size) {
|
std::list<std::list<typename Iterator::value_type>> partition_(Iterator b, Iterator e, Fun && function, size_t output_size) {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using T = typename decay<decltype(*b)>::type;
|
using T = typename decay<decltype(*b)>::type;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
static auto create_transfer_sequences(const mealy& machine, const state s, const input ignore){
|
static vector<bool> create_transfer_sequences(const mealy& machine, const state s, const input ignore){
|
||||||
vector<bool> visited(machine.graph_size, false);
|
vector<bool> visited(machine.graph_size, false);
|
||||||
|
|
||||||
queue<state> work;
|
queue<state> work;
|
||||||
|
|
Loading…
Add table
Reference in a new issue