1
Fork 0
mirror of https://github.com/Jaxan/hybrid-ads.git synced 2025-04-27 15:07:45 +02:00

Replaces auto return type with concrete types :(

This commit is contained in:
Joshua Moerman 2015-04-07 16:23:07 +02:00
parent 64b2331672
commit fd750e4abd
3 changed files with 5 additions and 5 deletions

View file

@ -29,7 +29,7 @@ struct mealy {
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){
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;
@ -37,12 +37,12 @@ inline auto is_complete(const mealy & m){
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];
}
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;
ret.to = state;
while(b != e){

View file

@ -8,7 +8,7 @@
#include <vector>
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 T = typename decay<decltype(*b)>::type;

View file

@ -7,7 +7,7 @@
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);
queue<state> work;