14#undef PARTITION_CHANGE_KIND_VERBOSE
15#undef PARTITION_COPY_VERBOSE
19namespace layer2_discreta {
88#ifdef PARTITION_COPY_VERBOSE
89 cout <<
"number_partition::copyobject_to()\n";
90 print_as_vector(cout);
94#ifdef PARTITION_COPY_VERBOSE
106 for (i = 0; i < l; i++) {
117 for (i = 0; i < l; i++) {
129 ost <<
"^{" << a <<
"}";
163 for (i = 1; i < n; i++) {
169 for (j = i - 1; j >= 0; j--) {
241 for (i = 0; i < n; i++) {
251 int i, ii = 0, n, s, a;
257 for (i = 1; i <= n; i++) {
260 q.
m_ii(s - 1, i - ii);
277 for (i = 0; i < n; i++) {
293 cout <<
"multinomial() factorial(" << n <<
")=" << a << endl;
297 for (i = 1; i <= n; i++) {
307 cout <<
"multinomial(" << *
this <<
") = " << res << endl;
322 cout <<
"multinomial_ordered(" << *
this <<
") = " << res << endl;
332 cout <<
"number_partition::sum_of_decreased_parts() not of type exponent\n";
336 for (i = 2; i <= n; i++) {
337 s +=
s_i(i - 1) * (i - 1);
DISCRETA vector class for vectors of DISCRETA objects.
discreta_base & s_i(int i)
void copyobject_to(discreta_base &x)
DISCRETA base class. All DISCRETA classes are derived from this class.
void integral_division_exact(discreta_base &x, discreta_base &q)
integer & change_to_integer()
discreta_base & factorial(int z)
void swap(discreta_base &a)
number_partition & as_number_partition()
void copyobject(discreta_base &x)
discreta_base & power_int(int l)
Vector & change_to_vector()
DISCRETA class for partitions of an integer.
void copyobject_to(discreta_base &x)
void allocate_number_partition()
void type(number_partition &q)
number_partition & operator=(const discreta_base &x)
std::ostream & print(std::ostream &)
int sum_of_decreased_parts()
int first_into_at_most_k_parts(int n, int k)
void settype_number_partition()
void multinomial_ordered(discreta_base &res, int f_v)
void multinomial(discreta_base &res, int f_v)
int next_into_at_most_k_parts(int n, int k)
void freeself_number_partition()
int first_into_k_parts(int n, int k)
int next_into_k_parts(int n, int k)
#define PARTITION_TYPE_EXPONENT
#define PARTITION_TYPE_VECTOR
enum printing_mode_enum current_printing_mode()
@ NUMBER_PARTITION
NUMBER_PARTITION.
the orbiter library for the classification of combinatorial objects
discreta_base * vector_pointer