/* Copyright (C) 2012 Børre Gaup This file is part of the program wordlist2hunspell. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef SETOPTIMIZER_H #define SETOPTIMIZER_H #include #include typedef std::map< int, std::set > Suffixes; class SetOptimizer { public: SetOptimizer(std::map< std::set< int >, std::set< int > > suffixSetStems); std::set< std::set< int > > getSuffixSetsFromStems(); std::set< std::set< int > > splitSuffixSetsIntoSubSets( ); void mapSubSets(); std::map< int, std::set< int > > getSuffixMap() const; std::map< std::set< int >, std::set< int > > giveSubsetsToStems(); private: std::map< std::set< int >, std::set< int > > _origSuffixSetStems; std::map< int, std::set > _suffixMap; }; #endif // SETOPTIMIZER_H