11 #ifndef INCLUDE_MOLASSEMBLER_SHAPES_PARTITIONER_H
12 #define INCLUDE_MOLASSEMBLER_SHAPES_PARTITIONER_H
15 #include "Molassembler/Export.h"
18 namespace Molassembler {
56 bool next_partition();
70 static bool isOrderedMapping(
const std::vector<unsigned>& mapping);
73 inline unsigned s()
const {
78 inline unsigned e()
const {
83 inline const std::vector<unsigned>&
map()
const {
const std::vector< unsigned > & map() const
Access to underlying flat map from element index to group index.
Definition: Partitioner.h:83
unsigned e() const
Number of elements per group.
Definition: Partitioner.h:78
unsigned E
Number of elements per group.
Definition: Partitioner.h:91
std::vector< unsigned > mapping
Flat map from element index to group index.
Definition: Partitioner.h:93
Given S * E distinguishable objects, this class helps enumerate all partitions into S groups of size ...
Definition: Partitioner.h:37
unsigned S
Number of groups.
Definition: Partitioner.h:89
unsigned s() const
Number of groups.
Definition: Partitioner.h:73