12 int first = collectionSize - minCollectionSize,
second = minCollectionSize;
16 std::vector<Partition>::iterator isub;
17 for (isub = subPartitions.begin(); isub != subPartitions.end(); isub++) {
23 copy(sub.begin(), sub.end(), partition.begin());
24 partition[partition.size() - 1] =
second;
35 int minCollectionSize)
const {
39 std::vector<std::vector<Partition> > sortedPartitions;
40 sortedPartitions.resize(
partitions.rbegin()->size());
43 sortedPartitions[(*i).size() - 1].push_back(*
i);
46 return sortedPartitions;
std::vector< std::vector< Partition > > sortedPartitions(int collectionSize, int minCollectionSize=1) const
U second(std::pair< T, U > const &p)
std::vector< int > Partition
std::vector< Partition > partitions(int collectionSize, int minCollectionSize=1) const