Skip to content

Commit

Permalink
Explain where bit vector implementation has shortcomings
Browse files Browse the repository at this point in the history
  • Loading branch information
Adda0 committed Feb 21, 2024
1 parent 9118012 commit ec7f8d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nfa/delta.cc
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,8 @@ OrdVector<Symbol> Delta::get_used_symbols() const {
//return utils::OrdVector<Symbol>(utils::NumberPredicate<Symbol>(get_used_symbols_bv()));

//WITH BOOL VECTOR (1.9s): (The fastest, it seems.)
// However, it will try to allocate a vector indexed by the symbols. If there are epsilons in the automaton,
// for example, the bool vector implementation will implode.
// std::vector<bool> bv{ get_used_symbols_bv() };
// utils::OrdVector<Symbol> ov{};
// const size_t bv_size{ bv.size() };
Expand Down Expand Up @@ -649,7 +651,6 @@ std::vector<bool> Delta::get_used_symbols_bv() const {
symbols[symbol_post.symbol] = true;
}
}
//TODO: is it neccessary toreturn ordered vector? Would the number predicate suffice?
return symbols;
}

Expand Down

0 comments on commit ec7f8d5

Please sign in to comment.