--- branches/new_design/OOPSE-3.0/src/utils/next_combination.hpp 2004/11/06 05:21:55 1720 +++ branches/new_design/OOPSE-3.0/src/utils/next_combination.hpp 2004/12/02 02:23:45 1823 @@ -130,62 +130,6 @@ bool next_combination(IteratorContainer sv; - * std::vector::iterator> sic; - * std::vector resultString; - * sv.push_back("H"); - * sv.push_back("C"); - * sv.push_back("N"); - - * while (replaceWithWildCard(sic, sv, resultString)) { - * for(std::vector::iterator i = resultString.begin(); i != resultString.end(); ++i) { - * std::cout << *i << "\t"; - * } - * std::cout << std::endl; - * } - * //output - * //H X X - * //X C X - * //X X N - * //H C X - * //H X N - * //X C N - * //H C N - * @endcode - */ -bool replaceWithWildCard(std::vector::iterator>& cont, - std::vector& sequence, std::vector& result, - const std::string& wildCard = "X") { - if (cont.size() > sequence.size()) { - std::cerr << "the size of iterator container is greater than the size of sequence"; - } - - bool hasMoreCombination = next_combination(cont, sequence.begin(), sequence.end()); - if (hasMoreCombination) { - result.clear(); - result.insert(result.begin(), sequence.size(), wildCard); - std::vector::iterator>::iterator i; - for ( i = cont.begin(); i != cont.end(); i++){ - result[*i - sequence.begin()] = **i; - } - } - - return hasMoreCombination; - -}//end replaceWildCard - } //end namespace oopse #endif //UTILS_NEXT_COMBINATION_HPP