Amalgams<T> class
A pseudo-list of amalgams (permutations with repetition).
A pseudo-list "containing" all the r
-amalgams (order important,
repetition allowed) of objects taken from the list items
.
Example
final a = Amalgams(3, characters("abcd"));
print("There are ${a.length} 3-amalgams of the objects");
print("in ${a.items}.");
print("The first amalgam is ${a[0]}.");
- Inheritance
-
- Object
- Combinatorics<
T> - Amalgams
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
items
→ List<
T> -
The list from which the objects are selected
no setteroverride
- iterable → Iterable
-
An
Iterable
object that "contains" all the arrangements.no setterinherited - length → BigInt
-
The number of arrangements "contained" in this pseudo-list.
no setteroverride
- r → int
-
The number of items taken from
items
.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
[Object? fromTo, Object? to]) → Iterable< List< T> > -
inherited
-
contains(
List< T> x) → bool -
Returns whether
x
is in the pseudo-list.override -
indexOf(
List< T> amalgam, [BigInt? start]) → BigInt -
Returns the index of
amalgam
in the list of arranged amalgams.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
range(
Object fromTo, [Object? to]) → Iterable< List< T> > -
Returns a range of arrangements.
inherited
-
sample(
int n, {int? seed, bool withReplacement = false}) → Iterable -
Generates a random sample of arrangements from this pseudo-list.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
Object k) → List< T> -
The
k
th arrangement.override