Namespaces | Functions
SundanceCombinatorialUtils.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  Sundance

Functions

Array< Array< int > > Sundance::partitionInteger (int n)
 Return partitions of an integer.
Array< Array< Array< int > > > Sundance::compositions (int n)
 Return compositions of an integer.
Array< Array< int > > Sundance::nonNegCompositions (int n, int J)
 Return the non-negative compositions of an integer into J terms.
Set< Pair< MultiSet< int > > > Sundance::loadPartitions (int x, int n, const MultiSet< int > &left, const MultiSet< int > &right)
 Form all pairs of multisets that can be generated from an initial pair by adding n copies of entry x.
Set< Pair< MultiSet< int > > > Sundance::binaryPartition (const MultiSet< int > &m)
 Return the size-2 partitions of a multiset.
Set< MultiSet< MultiSet< int > > > Sundance::multisetPartitions (const MultiSet< int > &m)
 Return the partitions of a multiset.
Map< int, int > Sundance::countMap (const MultiSet< int > &m)
 Given a multiset, create a mapping from entry to number of repetitions in the multisets.
Array< Array< int > > Sundance::indexCombinations (const Array< int > &s)
 For a given integer vector of length N, find all combinations of integers (i_1, 1_2, ...
Array< Array< Array< int > > > Sundance::binnings (const MultiSet< int > &mu, int n)
Array< Array< Array< int > > > Sundance::indexArrangements (const MultiSet< int > &mu, const Array< int > &k)
Set< MultiSet< int > > Sundance::multisetSubsets (const MultiSet< int > &x)
 Return all subsets of a multiset.
Array< Array< MultiSet< int > > > Sundance::multisetCompositions (int s, const MultiSet< int > &x)
 Return the s-term compositions of a multiset.
Array< Array< int > > Sundance::distinctIndexTuples (int m, int n)
 Generate the (n-choose-m) distinct index combinations for choosing m entries from an array of n elements.
Array< int > Sundance::bitsOfAnInteger (int x, int n)
 Compute the n bits of an integer x < 2^n.
int Sundance::pow2 (int n)
 Compute the n-th power of 2.

Site Contact