Even if we want to get just one partition, getPartitions() is called to get all, and then only one is kept.
It should be more efficient to also map partition indices to formulas in FlaPartitionMap and to use the indices directly wrt. the mask.
Also, the choice of std::map should be reconsidered in favor of std::unordered_map.
Use std::map only if keeping the order is really necessary. But we can actually use both maps, but use std::unordered_map for lookups.