Subsets<T> class
A pseudolist of subsets.
A pseudo-list "containing" all the subsets of objects taken from
the list elements
.
Example
final sub = Subsets(characters("abcd"));
print("There are ${sub.length} subsets of the objects");
print("in ${sub.items}.");
print("The first subset is ${sub[0]}.");
- Inheritance
-
- Object
- Combinatorics<
T> - Subsets
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
- 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> subset, [BigInt? start]) → BigInt -
Returns the index of
subset
in the list of arranged subsets.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