Package cc.redberry.core.combinatorics
See: Description
-
Interface Summary Interface Description IntCombinatorialPort This interface is common for all combinatorial iterators. -
Class Summary Class Description Combinatorics This class provides factory and utility methods for combinatorics infrastructure.IntCombinationPermutationGenerator This class represents an iterator over over all possible unique combinations with permutations (i.e.IntCombinationsGenerator This class represents an iterator over all unordered combinations (i.e.IntCombinatorialGenerator Parent interface for combinatoric iteratorsIntDistinctTuplesPort This class represents an iterator (implemented in the output port pattern) over all distinct N-tuples, which can be chosen fromNsets of integers.IntPermutationsGenerator This class represents iterator over all possible permutations of specified dimension written in one-line notation.IntPriorityPermutationsGenerator This class represents iterator over all possible permutations of specified dimension written in one-line notation (seeIntPermutationsGenerator) and allows to specify the niceness of a particular permutations, so they will appear earlier in the iteration if iterator was reset viaIntPriorityPermutationsGenerator.reset().IntTuplesPort This class allows to iterate over all N-tuples (not necessary to be distinct), which can be chosen fromNarrays of integers of the form arrayi = [0, 1, 2, ..., Ki]. -
Exception Summary Exception Description InconsistentGeneratorsException
Package cc.redberry.core.combinatorics Description
Provides a number of useful combinatorial algorithms. It includes two main types of classes: classes aimed on the enumeration of a particular kinds of combinations, and classes providing facilities to operate with single permutations and symmetric groups.
Enumerating combinations. All of the classes, which implements the algorithms of combinations enumeration
are strictly follows a common pattern of output port, which is specified in
IntCombinatorialPort. The calculation of the next combination occurs
strictly on the invocation of method IntCombinatorialPort.take() and the
returned array is always the same reference. Some of these classes are also implements Iterator and Iterable interfaces for convenience.
| List of enumeration algorithms: | |
IntPermutationsGenerator |
Enumerates all permutations of dimension N ( N! permutations). |
IntCombinationsGenerator |
Enumerates all combinations of K elements chosen as N ( N!/(K!(N-K)!) combinations). |
IntCombinationPermutationGenerator |
Enumerates all combinations with permutations of K elements chosen as N ( N!/(N-K)! combinations). |
IntDistinctTuplesPort |
Enumerates all distinct N-tuples, which can be chosen from N sets of integers. |
IntTuplesPort |
Enumerates all N-tuples, which can be chosen from N sets of integers of the form
arrayi = [0, 1, 2, ..., Ki]. |
IntPriorityPermutationsGenerator |
Enumerates all permutations of dimension N ( N! permutations) and allows to affect on the enumeration order. |
- Since:
- 1.0
- See Also:
cc.redberry.core.groups.permutations
DataMelt 3.0 © DataMelt by jWork.ORG