GiNaC 1.8.9
GiNaC::partition_with_zero_parts_generator Class Reference

Generate all bounded combinatorial partitions of an integer n with exactly m parts (including zero parts) in non-decreasing order. More...

#include <utils.h>

Inheritance diagram for GiNaC::partition_with_zero_parts_generator:
GiNaC::basic_partition_generator

Public Member Functions

 partition_with_zero_parts_generator (unsigned n_, unsigned m_)
 
const std::vector< unsigned > & get () const
 
bool next ()
 

Private Attributes

unsigned m
 
std::vector< unsigned > partition
 
bool current_updated
 

Additional Inherited Members

- Protected Member Functions inherited from GiNaC::basic_partition_generator
 basic_partition_generator (unsigned n_, unsigned m_)
 
- Protected Attributes inherited from GiNaC::basic_partition_generator
mpartition2 mpgen
 

Detailed Description

Generate all bounded combinatorial partitions of an integer n with exactly m parts (including zero parts) in non-decreasing order.

Definition at line 327 of file utils.h.

Constructor & Destructor Documentation

◆ partition_with_zero_parts_generator()

GiNaC::partition_with_zero_parts_generator::partition_with_zero_parts_generator ( unsigned n_,
unsigned m_ )
inline

Member Function Documentation

◆ get()

const std::vector< unsigned > & GiNaC::partition_with_zero_parts_generator::get ( ) const
inline

Definition at line 337 of file utils.h.

References current_updated, m, GiNaC::basic_partition_generator::mpgen, and partition.

Referenced by GiNaC::power::expand_add().

◆ next()

bool GiNaC::partition_with_zero_parts_generator::next ( )
inline

Definition at line 350 of file utils.h.

References current_updated, m, and GiNaC::basic_partition_generator::mpgen.

Referenced by GiNaC::power::expand_add().

Member Data Documentation

◆ m

unsigned GiNaC::partition_with_zero_parts_generator::m
private

Definition at line 329 of file utils.h.

Referenced by get(), next(), and partition_with_zero_parts_generator().

◆ partition

std::vector<unsigned> GiNaC::partition_with_zero_parts_generator::partition
mutableprivate

Definition at line 330 of file utils.h.

Referenced by get(), and partition_with_zero_parts_generator().

◆ current_updated

bool GiNaC::partition_with_zero_parts_generator::current_updated
mutableprivate

Definition at line 331 of file utils.h.

Referenced by get(), next(), and partition_with_zero_parts_generator().


The documentation for this class was generated from the following file:

This page is part of the GiNaC developer's reference. It was generated automatically by doxygen. For an introduction, see the tutorial.