CombinationCache<T, E> class

A combination cache. See generateCombinations.

Constructors

CombinationCache({required bool allowRepetition, Iterable<E> mapper(T e)?, bool validator(List<E> combination)?, bool allowSharedCombinations = false})

Properties

allowRepetition bool
final
allowSharedCombinations bool
final
computedCombinations int
Returns the number of computed combinations.
no setter
hashCode int
The hash code for this object.
no setterinherited
mapper → (Iterable<E> Function(T e)?)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
totalCachedCombinations int
Returns the total number of combinations in the cache.
no setter
validator → (bool Function(List<E> combination)?)
final

Methods

clear() → void
Clears the combinations cache.
getCombinations(Set<T> alphabet, int minimumSize, int maximumSize) List<List<E>>
Returns a cached combination or generates it.
getCombinationsShared(Set<T> alphabet, int minimumSize, int maximumSize) List<List<E>>
Same of getCombinations, but the returned List won't be isolated from the cache (is the actual instance inside the cache).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited