1 #ifndef __NUMERIC_INTEGER_PARTITIONING_HPP__ 2 #define __NUMERIC_INTEGER_PARTITIONING_HPP__ 9 #include <boost/foreach.hpp> 58 static std::string
toString(
const IntegerPartition& partition);
64 static std::string
toString(
const std::vector<IntegerPartition>& partitionList);
76 static size_t multiplicity(
const IntegerPartition& partition,
int value);
79 PartitionsMap mPartitionsMap;
83 std::ostream&
operator<<(std::ostream& os,
const IntegerPartition& list);
84 std::ostream& operator<<(std::ostream& os, const std::vector<IntegerPartition>& list);
87 #endif // __NUMERIC_INTEGER_PARTITIONING_HPP__ Computer integer partitions.
Definition: IntegerPartitioning.hpp:31
PartitionsMap getPartitionsMap() const
Definition: IntegerPartitioning.hpp:70
void compute(size_t number)
Definition: IntegerPartitioning.cpp:78
std::vector< int > IntegerPartition
Definition: IntegerPartitioning.hpp:13
std::map< size_t, std::set< IntegerPartition > > PartitionsMap
Definition: IntegerPartitioning.hpp:34
std::ostream & operator<<(std::ostream &os, const IntegerPartition &list)
Definition: IntegerPartitioning.cpp:19
std::string toString() const
Definition: IntegerPartitioning.cpp:121
static size_t multiplicity(const IntegerPartition &partition, int value)
Definition: IntegerPartitioning.cpp:5