Remove no longer needed eCloseCache

This commit is contained in:
Robin Jadoul 2016-05-27 19:08:29 +02:00
parent f3e0eb71d5
commit 23437e8f23
2 changed files with 2 additions and 7 deletions

View File

@ -35,8 +35,7 @@ namespace lxs {
std::map<State, std::set<State> > epsilonTransitions;
virtual std::set<State> eClose(State) const;
private:
mutable std::map<State, std::set<State> > eCloseCache;
virtual std::set<State> eClose(State) const;
};
std::string toDot(const DFA& d);

View File

@ -98,10 +98,6 @@ namespace lxs {
}
std::set<State> ENFA::eClose(State s) const {
auto cachedIt = eCloseCache.find(s);
if (cachedIt != eCloseCache.end()) {
return cachedIt->second;
}
std::set<State> states;
std::queue<State> statequeue;
statequeue.push(s);
@ -118,7 +114,7 @@ namespace lxs {
}
}
}
return eCloseCache[s] = states;
return states;
}
std::set<State> NFA::eClose(State s) const {