From ec7f8d5ab9868a05504d36ee56b96d778b70505a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Chocholat=C3=BD?= Date: Wed, 21 Feb 2024 06:29:32 +0100 Subject: [PATCH] Explain where bit vector implementation has shortcomings --- src/nfa/delta.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nfa/delta.cc b/src/nfa/delta.cc index f0aa39d5..7291f608 100644 --- a/src/nfa/delta.cc +++ b/src/nfa/delta.cc @@ -548,6 +548,8 @@ OrdVector Delta::get_used_symbols() const { //return utils::OrdVector(utils::NumberPredicate(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 bv{ get_used_symbols_bv() }; // utils::OrdVector ov{}; // const size_t bv_size{ bv.size() }; @@ -649,7 +651,6 @@ std::vector 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; }