time complxity of this fsm
Closed this issue · 4 comments
I aprreciate the code you shared. But it seems that every time this fsm handles an event, it needs to search the transition table. So the time complexity for each call of process_event
is O(N) (N is the count of rows) , not O(1), which makes this fsm unpractical .
For time complexity etc. see the references given in the README.
sorry but i can't find the references in README. I only found a documentation of api. Could you please provide me a linkage?
fsmlite is a lightweight finite state machine framework for C++11.
It is based on concepts first presented by David Abrahams and Aleksey
Gurtovoy in C++ Template Metaprogramming, with additional ideas
taken liberally from Boost's Meta State Machine (MSM).
I look through the linkage of MSM but still not found anything explicitly about time complexity. By the way, is there anything wrong with my analysis of O(N) complexity about your code above?