GiNaC 1.8.7
Classes | Public Member Functions | Private Attributes | List of all members
GiNaC::composition_generator Class Reference

Generate all compositions of a partition of an integer n, starting with the compositions which has non-decreasing order. More...

#include <utils.h>

Classes

struct  coolmulti
 

Public Member Functions

 composition_generator (const std::vector< unsigned > &partition)
 
const std::vector< unsigned > & get () const
 
bool next ()
 

Private Attributes

struct GiNaC::composition_generator::coolmulti cmgen
 
bool atend
 
bool trivial
 
std::vector< unsigned > composition
 
bool current_updated
 

Detailed Description

Generate all compositions of a partition of an integer n, starting with the compositions which has non-decreasing order.

Definition at line 395 of file utils.h.

Constructor & Destructor Documentation

◆ composition_generator()

GiNaC::composition_generator::composition_generator ( const std::vector< unsigned > &  partition)
inlineexplicit

Definition at line 454 of file utils.h.

References trivial.

Member Function Documentation

◆ get()

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

◆ next()

bool GiNaC::composition_generator::next ( )
inline

Member Data Documentation

◆ cmgen

struct GiNaC::composition_generator::coolmulti GiNaC::composition_generator::cmgen
private

Referenced by get(), and next().

◆ atend

bool GiNaC::composition_generator::atend
private

Definition at line 449 of file utils.h.

Referenced by next().

◆ trivial

bool GiNaC::composition_generator::trivial
private

Definition at line 450 of file utils.h.

Referenced by composition_generator(), and next().

◆ composition

std::vector<unsigned> GiNaC::composition_generator::composition
mutableprivate

Definition at line 451 of file utils.h.

Referenced by get().

◆ current_updated

bool GiNaC::composition_generator::current_updated
mutableprivate

Definition at line 452 of file utils.h.

Referenced by get(), and next().


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.