d3_array library
d3-array 3.2.4 in native, fully statically typed Dart with no Flutter import (ADR 0011, D3 ADR 0017).
Exports every pure file of the port without show/hide combinators so it
compiles for the Dart VM, AOT, JavaScript, and WebAssembly with zero
runtime dependencies.
Classes
- Adder
- A full-precision IEEE-754 floating-point adder implementing Shewchuk's adaptive summation algorithm.
-
Bin<
T> -
A histogram bin containing elements of type
Twithin[x0, x1). -
BinGenerator<
T> -
A configurable, callable histogram bin generator for elements of type
T. -
Bisector<
T, X> -
A typed binary-search bisector over lists of
Tsearched by keys ofX. - Blur2Data
- A 2D scalar grid for blur2.
- BlurImageData
- An RGBA pixel buffer for blurImage.
-
InternMap<
K, V, I> -
A typed Map that canonicalizes keys using a projection
keyfromKtoI, retaining the firstKinserted for each canonical keyI. -
InternSet<
T, I> -
A typed Set that canonicalizes values using a projection
keyfromTtoI, retaining the firstTinserted for each canonical keyI. - Shuffler
-
A callable generic Fisher-Yates shuffler parameterized by a uniform random
source returning doubles in
[0, 1).
Constants
- d3ArrayVersion → const String
-
The pinned upstream version of
d3-array.
Functions
-
arrayConstant<
T> (T x) → T Function() -
Returns a function that always returns
x. -
arrayIdentity<
T> (T x) → T -
Returns
xunchanged. -
arrayNumber(
num? x) → double -
Converts a nullable numeric value
xtodouble, returningdouble.nanfornull. -
arrayNumbers(
Iterable< num?> values) → Iterable<double> -
Yields non-null, non-NaN numeric values from
valuesasdouble. -
arrayNumbersBy<
T> (Iterable< T> values, num? valueof(T value)) → Iterable<double> -
Yields non-null, non-NaN numeric values extracted from
valuesviavalueof. -
arrayNumbersByIndexed<
T> (Iterable< T> values, num? valueof(T value, int index, Iterable<T> values)) → Iterable<double> -
Yields non-null, non-NaN numeric values extracted from
valuesvia indexedvalueof. -
arraySlice<
T> (List< T> list, [int start = 0, int? end]) → List<T> -
Returns a shallow copy of
list, optionally sliced fromstarttoend. -
ascending<
T extends Comparable< (Object> >T? a, T? b) → double -
Returns
-1ifais less thanb,1ifais greater thanb,0if equal, ordouble.nanif either value isnullorNaN. -
ascendingComparator<
T extends Comparable< (Object> >) → double Function(T? a, T? b) -
Reference export kept for callers referencing ascending via
sort.dart. -
ascendingDefined<
T extends Comparable< (Object> >T? a, T? b) → int -
Total-order ascending comparator placing
nullandNaNvalues at the end. -
ascendingDefinedDouble(
double a, double b) → int -
Fast ascending comparator for
doublevalues placingNaNat the end. -
bin<
T extends num?> ({BinDomainAccessor? domain, BinThresholdCount? thresholdsCount, BinThresholdValues? thresholdsValues}) → BinGenerator< T> - Creates a numeric BinGenerator with default identity value, extent domain, and thresholdSturges thresholds.
-
binBy<
T> (num? value(T value), {BinDomainAccessor? domain, BinThresholdCount? thresholdsCount, BinThresholdValues? thresholdsValues}) → BinGenerator< T> -
Creates a BinGenerator for arbitrary data of type
Tusing a 1-arg numericvalueaccessor. -
binByIndexed<
T> (BinValueAccessor< T> value, {BinDomainAccessor? domain, BinThresholdCount? thresholdsCount, BinThresholdValues? thresholdsValues}) → BinGenerator<T> -
Creates a BinGenerator for arbitrary data of type
Tusing an indexed numericvalueaccessor. -
bisect<
T extends Comparable< (Object> >List< T?> a, T? x, [int lo = 0, int? hi]) → int - Alias for bisectRight.
-
bisectCenter(
List< num?> a, num? x, [int lo = 0, int? hi]) → int -
Returns the index of the numeric value closest to
xin sorteda. -
bisectCenterDate(
List< DateTime?> a, DateTime? x, [int lo = 0, int? hi]) → int -
Returns the index of the DateTime closest to
xin sorteda. -
bisectLeft<
T extends Comparable< (Object> >List< T?> a, T? x, [int lo = 0, int? hi]) → int -
Returns the insertion point for
xin sortedabefore any existing equal entries. -
bisector<
T, X extends Comparable< (Object> >X? accessor(T d), {double delta(X? a, X? b)?}) → Bisector< T, X> -
Creates a Bisector using a typed key
accessor. -
bisectorComparator<
T> (num compare(T a, T b)) → Bisector< T, T> -
Creates a Bisector using a symmetric comparator
compare(a, b). -
bisectorCompare<
T, X> (num compare(T d, X x), {bool isDefined(X x)?}) → Bisector< T, X> -
Creates a Bisector using an asymmetric comparator
compare(d, x). -
bisectorNullable<
T, X extends Comparable< (Object> >X? accessor(T d), {double delta(X? a, X? b)?}) → Bisector< T, X?> -
Creates a Bisector using a typed nullable key
accessor. -
bisectRight<
T extends Comparable< (Object> >List< T?> a, T? x, [int lo = 0, int? hi]) → int -
Returns the insertion point for
xin sortedaafter any existing equal entries. -
blur(
List< double> values, double r) → List<double> -
Blurs
valuesin-place with an approximate Gaussian kernel of radiusr(3 box-blur passes) and returnsvalues. -
blur2(
Blur2Data data, double rx, [double? ry]) → Blur2Data -
Blurs a 2D scalar grid
datain-place with horizontal radiusrxand vertical radiusry(defaulting torx) and returnsdata. -
blurImage(
BlurImageData data, double rx, [double? ry]) → BlurImageData -
Blurs an RGBA image buffer
datain-place with horizontal radiusrxand vertical radiusry(defaulting torx) and returnsdata. -
clampBinIndex(
int i, int m) → int -
Ensures
mathimport is used cleanly for bounds clamping if needed. -
compareDefined<
T> (num compare(T a, T b)) → int Function(T a, T b) -
Promotes a partial comparator
compare(which may returndouble.nanfor unorderable elements) into a total-order comparator compatible with List.sort, placing unorderable elements at the end. -
count(
Iterable< num?> values) → int -
Returns the number of valid (non-null, non-NaN) numeric values in
values. -
countBy<
T> (Iterable< T> values, num? valueof(T value)) → int -
Returns the number of valid numeric values extracted from
valuesusingvalueof. -
countByIndexed<
T> (Iterable< T> values, num? valueof(T value, int index, Iterable<T> values)) → int -
Returns the number of valid numeric values extracted from
valuesusing indexedvalueof. -
cross<
A, B> (Iterable< A> a, Iterable<B> b) → List<(A, B)> -
Returns the Cartesian product of
aandbas(A, B)records. -
cross3<
A, B, C> (Iterable< A> a, Iterable<B> b, Iterable<C> c) → List<(A, B, C)> -
Returns the 3-way Cartesian product of
a,b, andcas(A, B, C)records. -
cross3With<
A, B, C, R> (Iterable< A> a, Iterable<B> b, Iterable<C> c, R reduce(A a, B b, C c)) → List<R> -
Returns the 3-way Cartesian product of
a,b, andcmapped throughreduce. -
crossAll<
T> (Iterable< Iterable< iterables) → List<T> >List< T> > -
Returns the homogeneous N-way Cartesian product of
iterables. -
crossAllWith<
T, R> (Iterable< Iterable< iterables, R reduce(List<T> >T> tuple)) → List<R> -
Returns the homogeneous N-way Cartesian product of
iterablesmapped throughreduce. -
crossWith<
A, B, R> (Iterable< A> a, Iterable<B> b, R reduce(A a, B b)) → List<R> -
Returns the Cartesian product of
aandbmapped throughreduce. -
cumsum(
Iterable< num?> values) → Float64List -
Returns the cumulative sum of
valuesas a Float64List of the same length, treatingnullandNaNas0.0. -
cumsumBy<
T> (Iterable< T> values, num? valueof(T value)) → Float64List -
Returns the cumulative sum of values extracted from
valuesusingvalueofas a Float64List. -
cumsumByIndexed<
T> (Iterable< T> values, num? valueof(T value, int index, Iterable<T> values)) → Float64List -
Returns the cumulative sum of values extracted from
valuesusing indexedvalueofas a Float64List. -
descending<
T extends Comparable< (Object> >T? a, T? b) → double -
Returns
-1ifbis less thana,1ifbis greater thana,0if equal, ordouble.nanif either value isnullorNaN. -
deviation(
Iterable< num?> values) → double? -
Returns the sample standard deviation (square root of variance) of
values, ornullif fewer than 2 valid numbers exist. -
deviationBy<
T> (Iterable< T> values, num? valueof(T value)) → double? -
Returns the sample standard deviation of values extracted from
valuesusingvalueof. -
deviationByIndexed<
T> (Iterable< T> values, num? valueof(T value, int index, Iterable<T> values)) → double? -
Returns the sample standard deviation of values extracted from
valuesusing indexedvalueof. -
difference<
T> (Iterable< T> values, Iterable<Iterable< others) → Set<T> >T> -
Returns a new Set containing every distinct value in
valuesthat does not appear in any iterable ofothers. -
difference2<
T> (Iterable< T> a, Iterable<T> b) → Set<T> -
Returns a new Set containing every distinct value in
athat is not inb. -
disjoint<
T> (Iterable< T> values, Iterable<T> other) → bool -
Returns
trueifvaluesandotherhave no shared elements (lazily consumingotheruntil a match is found). -
every<
T> (Iterable< T> values, bool test(T value, int index, Iterable<T> values)) → bool -
Returns
trueiftestreturnstruefor every element ofvalues. -
extent<
T extends Comparable< (Object> >Iterable< T?> values) → (T, T)? -
Returns the
(min, max)record ofvaluesusing natural order, ignoringnullandNaN, ornullif no valid comparable value exists. -
extentBy<
T, K extends Comparable< (Object> >Iterable< T> values, K? valueof(T value)) → (K, K)? -
Returns the
(min, max)record of values extracted fromvaluesusingvalueof, ornullif no valid comparable value exists. -
extentByIndexed<
T, K extends Comparable< (Object> >Iterable< T> values, K? valueof(T value, int index, Iterable<T> values)) → (K, K)? -
Returns the
(min, max)record of values extracted fromvaluesusing indexedvalueof, ornullif no valid comparable value exists. -
fcumsum(
Iterable< num?> values) → Float64List -
Returns the full-precision cumulative sum of
valuesas a Float64List. -
fcumsumBy<
T> (Iterable< T> values, num? valueof(T value)) → Float64List -
Returns the full-precision cumulative sum of values extracted from
valuesusingvalueofas a Float64List. -
fcumsumByIndexed<
T> (Iterable< T> values, num? valueof(T value, int index, Iterable<T> values)) → Float64List -
Returns the full-precision cumulative sum of values extracted from
valuesusing indexedvalueofas a Float64List. -
filter<
T> (Iterable< T> values, bool test(T value, int index, Iterable<T> values)) → List<T> -
Returns a new List containing the elements of
valuesfor whichtestreturnstrue. -
flatGroup<
T, K> (Iterable< T> values, K key(T value)) → List<(K, List< T> )> -
Returns a flat list of
(key, group)records (1-level flatGroup). -
flatGroup2<
T, K1, K2> (Iterable< T> values, K1 key1(T value), K2 key2(T value)) → List<(K1, K2, List< T> )> -
Groups
valuesbykey1andkey2into flat(key1, key2, group)records. -
flatGroup3<
T, K1, K2, K3> (Iterable< T> values, K1 key1(T value), K2 key2(T value), K3 key3(T value)) → List<(K1, K2, K3, List< T> )> -
Groups
valuesbykey1,key2,key3into flat(key1, key2, key3, group)records. -
flatRollup<
T, K, R> (Iterable< T> values, R reduce(List<T> group), K key(T value)) → List<(K, R)> -
Returns a flat list of
(key, reduced)records (1-level flatRollup). -
flatRollup2<
T, K1, K2, R> (Iterable< T> values, R reduce(List<T> group), K1 key1(T value), K2 key2(T value)) → List<(K1, K2, R)> -
Groups
valuesbykey1andkey2, reduces each leaf group withreduce, and returns flat(key1, key2, reduced)records. -
flatRollup3<
T, K1, K2, K3, R> (Iterable< T> values, R reduce(List<T> group), K1 key1(T value), K2 key2(T value), K3 key3(T value)) → List<(K1, K2, K3, R)> -
Groups
valuesbykey1,key2, andkey3, reduces each leaf group withreduce, and returns flat(key1, key2, key3, reduced)records. -
fsum(
Iterable< num?> values) → double -
Returns a full-precision summation of
values, ignoringnullandNaN. -
fsumBy<
T> (Iterable< T> values, num? valueof(T value)) → double -
Returns a full-precision summation of values extracted from
valuesusingvalueof. -
fsumByIndexed<
T> (Iterable< T> values, num? valueof(T value, int index, Iterable<T> values)) → double -
Returns a full-precision summation of values extracted from
valuesusing indexedvalueof. -
greatest<
T extends Comparable< (Object> >Iterable< T?> values, [num compare(T? a, T? b)?]) → T? -
Returns the greatest element of
valuesaccording tocompare(defaulting to ascending), ornullif no comparable element exists. -
greatestBy<
T, K extends Comparable< (Object> >Iterable< T> values, K? accessor(T value)) → T? -
Returns the element of
valueswith the greatest key extracted byaccessor, ornullif no valid comparable key exists. -
greatestIndex<
T extends Comparable< (Object> >Iterable< T?> values, [num compare(T? a, T? b)?]) → int -
Returns the index of the greatest element of
valuesaccording tocompare(defaulting to ascending), or-1if no comparable element exists. -
greatestIndexBy<
T, K extends Comparable< (Object> >Iterable< T> values, K? accessor(T value)) → int -
Returns the index of the element of
valueswith the greatest key extracted byaccessor, or-1if no valid comparable key exists. -
greatestIndexWith<
T> (Iterable< T> values, num compare(T a, T b)) → int -
Returns the index of the greatest element of
valuesaccording tocompare, or-1if no comparable element exists. -
greatestWith<
T> (Iterable< T> values, num compare(T a, T b)) → T? -
Returns the greatest element of
valuesaccording tocompare, ornullif no comparable element exists. -
group<
T, K> (Iterable< T> values, K key(T value)) → Map<K, List< T> > -
Groups
valuesinto a Map keyed bykey, preserving insertion order. -
group2<
T, K1, K2> (Iterable< T> values, K1 key1(T value), K2 key2(T value)) → Map<K1, Map< K2, List< >T> > -
Groups
valuesinto a 2-level nested Map keyed bykey1, thenkey2. -
group3<
T, K1, K2, K3> (Iterable< T> values, K1 key1(T value), K2 key2(T value), K3 key3(T value)) → Map<K1, Map< K2, Map< >K3, List< >T> > -
Groups
valuesinto a 3-level nested Map keyed bykey1,key2,key3. -
groupIndexed<
T, K> (Iterable< T> values, K key(T value, int index, Iterable<T> values)) → Map<K, List< T> > -
Groups
valuesusing an indexed key accessor(value, index, values). -
groups<
T, K> (Iterable< T> values, K key(T value)) → List<(K, List< T> )> -
Groups
valuesbykeyand returns(key, group)entries. -
groups2<
T, K1, K2> (Iterable< T> values, K1 key1(T value), K2 key2(T value)) → List<(K1, List< (K2, List< )>T> )> -
Groups
valuesinto a 2-level nested entry list keyed bykey1, thenkey2. -
groups3<
T, K1, K2, K3> (Iterable< T> values, K1 key1(T value), K2 key2(T value), K3 key3(T value)) → List<(K1, List< (K2, List< )>(K3, List< )>T> )> -
Groups
valuesinto a 3-level nested entry list keyed bykey1,key2,key3. -
groupsIndexed<
T, K> (Iterable< T> values, K key(T value, int index, Iterable<T> values)) → List<(K, List< T> )> -
Groups
valuesby indexedkeyand returns(key, group)entries. -
groupSort<
T, K extends Comparable< (Object> , R extends Comparable<Object> >Iterable< T> values, R? reduce(List<T> group), K key(T value)) → List<K> -
Groups
valuesbykey, reduces each group withreduce, and returns the keys sorted in ascending order of the reduced value (tie-breaking by ascending key). -
groupSortCompare<
T, K extends Comparable< (Object> >Iterable< T> values, num compare(List<T> a, List<T> b), K key(T value)) → List<K> -
Groups
valuesbykeyand returns the keys sorted according tocompareon the grouped element lists (tie-breaking by ascending key). -
histogram<
T extends num?> ({BinDomainAccessor? domain, BinThresholdCount? thresholdsCount, BinThresholdValues? thresholdsValues}) → BinGenerator< T> - Deprecated alias for bin.
-
index<
T, K> (Iterable< T> values, K key(T value)) → Map<K, T> -
Indexes
valuesinto a Map by uniquekey, throwing StateError on duplicate keys. -
index2<
T, K1, K2> (Iterable< T> values, K1 key1(T value), K2 key2(T value)) → Map<K1, Map< K2, T> > -
Indexes
valuesinto a 2-level Map keyed bykey1, then uniquekey2. -
index3<
T, K1, K2, K3> (Iterable< T> values, K1 key1(T value), K2 key2(T value), K3 key3(T value)) → Map<K1, Map< K2, Map< >K3, T> > -
Indexes
valuesinto a 3-level Map keyed bykey1,key2, and uniquekey3. -
indexes<
T, K> (Iterable< T> values, K key(T value)) → List<(K, T)> -
Indexes
valuesby uniquekeyand returns(key, value)entries. -
indexes2<
T, K1, K2> (Iterable< T> values, K1 key1(T value), K2 key2(T value)) → List<(K1, List< (K2, T)> )> -
Indexes
valuesinto a 2-level entry list keyed bykey1, then uniquekey2. -
indexes3<
T, K1, K2, K3> (Iterable< T> values, K1 key1(T value), K2 key2(T value), K3 key3(T value)) → List<(K1, List< (K2, List< )>(K3, T)> )> -
Indexes
valuesinto a 3-level entry list keyed bykey1,key2, and uniquekey3. -
indexesIndexed<
T, K> (Iterable< T> values, K key(T value, int index, Iterable<T> values)) → List<(K, T)> -
Indexes
valuesby unique indexedkeyand returns(key, value)entries. -
indexIndexed<
T, K> (Iterable< T> values, K key(T value, int index, Iterable<T> values)) → Map<K, T> -
Indexes
valuesinto a Map by unique indexedkey. -
intersection<
T> (Iterable< T> values, Iterable<Iterable< others) → Set<T> >T> -
Returns a new Set containing every distinct value in
valuesthat also appears in every iterable ofothers. -
intersection2<
T> (Iterable< T> a, Iterable<T> b) → Set<T> -
Returns a new Set containing every distinct value present in both
aandb. -
least<
T extends Comparable< (Object> >Iterable< T?> values, [num compare(T? a, T? b)?]) → T? -
Returns the least element of
valuesaccording tocompare(defaulting to ascending), ornullif no comparable element exists. -
leastBy<
T, K extends Comparable< (Object> >Iterable< T> values, K? accessor(T value)) → T? -
Returns the element of
valueswith the least key extracted byaccessor, ornullif no valid comparable key exists. -
leastIndex<
T extends Comparable< (Object> >Iterable< T?> values, [num compare(T? a, T? b)?]) → int -
Returns the index of the least element of
valuesaccording tocompare(defaulting to ascending), or-1if no comparable element exists. -
leastIndexBy<
T, K extends Comparable< (Object> >Iterable< T> values, K? accessor(T value)) → int -
Returns the index of the element of
valueswith the least key extracted byaccessor, or-1if no valid comparable key exists. -
leastIndexWith<
T> (Iterable< T> values, num compare(T a, T b)) → int -
Returns the index of the least element of
valuesaccording tocompare, or-1if no comparable element exists. -
leastWith<
T> (Iterable< T> values, num compare(T a, T b)) → T? -
Returns the least element of
valuesaccording tocompare, ornullif no comparable element exists. -
map<
T, R> (Iterable< T> values, R mapper(T value, int index, Iterable<T> values)) → List<R> -
Returns a new List containing the mapped values of
valuesproduced bymapper. -
max<
T extends Comparable< (Object> >Iterable< T?> values) → T? -
Returns the maximum value in
valuesusing natural order, ignoringnullandNaN, ornullif no valid value exists. -
maxBy<
T, K extends Comparable< (Object> >Iterable< T> values, K? valueof(T value)) → K? -
Returns the maximum value extracted from
valuesusingvalueof. -
maxByIndexed<
T, K extends Comparable< (Object> >Iterable< T> values, K? valueof(T value, int index, Iterable<T> values)) → K? -
Returns the maximum value extracted from
valuesusing indexedvalueof. -
maxIndex<
T extends Comparable< (Object> >Iterable< T?> values) → int -
Returns the index of the maximum value in
valuesusing natural order, ignoringnullandNaN, or-1if no valid value exists. -
maxIndexBy<
T, K extends Comparable< (Object> >Iterable< T> values, K? valueof(T value)) → int -
Returns the index of the maximum value extracted from
valuesusingvalueof, or-1if no valid value exists. -
maxIndexByIndexed<
T, K extends Comparable< (Object> >Iterable< T> values, K? valueof(T value, int index, Iterable<T> values)) → int -
Returns the index of the maximum value extracted from
valuesusing indexedvalueof, or-1if no valid value exists. -
mean(
Iterable< num?> values) → double? -
Returns the arithmetic mean of
values, ignoringnullandNaN, ornullifvaluescontains no valid numbers. -
meanBy<
T> (Iterable< T> values, num? valueof(T value)) → double? -
Returns the arithmetic mean of numeric values extracted from
valuesusingvalueof. -
meanByIndexed<
T> (Iterable< T> values, num? valueof(T value, int index, Iterable<T> values)) → double? -
Returns the arithmetic mean of numeric values extracted from
valuesusing indexedvalueof. -
median(
Iterable< num?> values) → double? -
Returns the median (
0.5-quantile) ofvaluesusing the R-7 method, ignoringnullandNaN, ornullif no valid numbers exist. -
medianBy<
T> (Iterable< T> values, num? valueof(T value)) → double? -
Returns the median of numeric values extracted from
valuesusingvalueof. -
medianByIndexed<
T> (Iterable< T> values, num? valueof(T value, int index, Iterable<T> values)) → double? -
Returns the median of numeric values extracted from
valuesusing indexedvalueof. -
medianIndex(
List< num?> values) → int? -
Returns the index of the median element of
values, or-1if no valid value exists. -
medianIndexBy<
T> (List< T> values, num? valueof(T value)) → int? -
Returns the index of the median element of
valuesusingvalueof. -
medianIndexByIndexed<
T> (List< T> values, num? valueof(T value, int index, List<T> values)) → int? -
Returns the index of the median element of
valuesusing indexedvalueof. -
merge<
T> (Iterable< Iterable< iterables) → List<T> >T> -
Merges the specified
iterablesinto a single flat List. -
min<
T extends Comparable< (Object> >Iterable< T?> values) → T? -
Returns the minimum value in
valuesusing natural order, ignoringnullandNaN, ornullif no valid value exists. -
minBy<
T, K extends Comparable< (Object> >Iterable< T> values, K? valueof(T value)) → K? -
Returns the minimum value extracted from
valuesusingvalueof. -
minByIndexed<
T, K extends Comparable< (Object> >Iterable< T> values, K? valueof(T value, int index, Iterable<T> values)) → K? -
Returns the minimum value extracted from
valuesusing indexedvalueof. -
minIndex<
T extends Comparable< (Object> >Iterable< T?> values) → int -
Returns the index of the minimum value in
valuesusing natural order, ignoringnullandNaN, or-1if no valid value exists. -
minIndexBy<
T, K extends Comparable< (Object> >Iterable< T> values, K? valueof(T value)) → int -
Returns the index of the minimum value extracted from
valuesusingvalueof, or-1if no valid value exists. -
minIndexByIndexed<
T, K extends Comparable< (Object> >Iterable< T> values, K? valueof(T value, int index, Iterable<T> values)) → int -
Returns the index of the minimum value extracted from
valuesusing indexedvalueof, or-1if no valid value exists. -
mode<
T> (Iterable< T?> values) → T? -
Returns the mode (most frequent value) of
values, ignoringnullandNaN. Ties are broken by first appearance. Returnsnullif no valid values exist. -
modeBy<
T, K> (Iterable< T> values, K? valueof(T value)) → K? -
Returns the mode of values extracted from
valuesusingvalueof. -
modeByIndexed<
T, K> (Iterable< T> values, K? valueof(T value, int index, Iterable<T> values)) → K? -
Returns the mode of values extracted from
valuesusing indexedvalueof. -
nice(
num start, num stop, num count) → (double, double) -
Returns a nicely-rounded
(start, stop)interval extending[start, stop]to clean tick multiples for approximatelycountticks. -
pair<
T> (T a, T b) → (T, T) -
Returns the 2-tuple record
(a, b). -
pairs<
T> (Iterable< T> values) → List<(T, T)> -
Returns a list of adjacent pairs
(previous, current)fromvalues. -
pairsWith<
T, R> (Iterable< T> values, R pairof(T a, T b)) → List<R> -
Returns a list of adjacent pairs from
valuescombined usingpairof. -
permute<
T> (List< T> source, Iterable<int> keys) → List<T> -
Returns a permutation of
sourceusing the specified integerkeys. -
permuteMap<
K, V> (Map< K, V> source, Iterable<K> keys) → List<V?> -
Returns a permutation of values from
sourcemap for the specifiedkeys. -
permuteNullable<
T> (List< T> source, Iterable<int> keys) → List<T?> -
Returns a permutation of
sourceusing integerkeys, producingnullfor out-of-range indices (matching JavaScript array indexing). -
quantile(
Iterable< num?> values, double p) → double? -
Returns the
p-quantile ofvaluesusing the R-7 method (pin[0, 1]), ignoringnullandNaN, ornullif no valid numbers exist orpisNaN. -
quantileBy<
T> (Iterable< T> values, double p, num? valueof(T value)) → double? -
Returns the
p-quantile of numeric values extracted fromvaluesusingvalueof. -
quantileByIndexed<
T> (Iterable< T> values, double p, num? valueof(T value, int index, Iterable<T> values)) → double? -
Returns the
p-quantile of numeric values extracted fromvaluesusing indexedvalueof. -
quantileIndex(
List< num?> values, double p) → int? -
Returns the index of the element corresponding to the
p-quantile ofvalues,nullifpisNaN, or-1if no valid value exists. -
quantileIndexBy<
T> (List< T> values, double p, num? valueof(T value)) → int? -
Returns the index of the element corresponding to the
p-quantile ofvaluesusingvalueof. -
quantileIndexByIndexed<
T> (List< T> values, double p, num? valueof(T value, int index, List<T> values)) → int? -
Returns the index of the element corresponding to the
p-quantile ofvaluesusing indexedvalueof. -
quantileSorted(
List< num?> values, double p) → double? -
Returns the
p-quantile of already-sorted numericvalueswithout copying or partitioning. -
quantileSortedBy<
T> (List< T> values, double p, num? valueof(T value)) → double? -
Returns the
p-quantile of already-sortedvaluesusingvalueof. -
quantileSortedByIndexed<
T> (List< T> values, double p, num? valueof(T value, int index, List<T> values)) → double? -
Returns the
p-quantile of already-sortedvaluesusing indexedvalueof. -
quickselect<
T extends Comparable< (Object> >List< T> array, int k, [int left = 0, int? right, num compare(T a, T b)?]) → List<T> -
Rearranges elements in
arrayin-place betweenleftandright(inclusive) such thatarray[k]is in its sorted position, all elements beforekare<= array[k], and all elements afterkare>= array[k]. -
quickselectFloat64NoNaN(
Float64List array, int k, int left, int right) → void -
Fast internal Floyd-Rivest selection on a Float64List guaranteed to
contain no
NaNvalues. -
quickselectNullable<
T extends Comparable< (Object> >List< T?> array, int k, [int left = 0, int? right, num compare(T? a, T? b)?]) → List<T?> -
Rearranges nullable elements in
arrayin-place placingnullandNaNelements last. -
quickselectWith<
T> (List< T> array, int k, num compare(T a, T b), [int left = 0, int? right]) → List<T> -
Rearranges elements in
arrayin-place according tocompare. -
range(
num start, [num? stop, num? step]) → List< double> -
Returns a list of an arithmetic progression of numbers starting at
start(inclusive) up tostop(exclusive) in increments ofstep. -
rank<
T extends Comparable< (Object> >Iterable< T> values, [num compare(T a, T b)?]) → Float64List -
Returns a Float64List with the competition rank of each element in
values(defaulting to ascending), withdouble.nanfor unorderable elements. -
rankBy<
T, K extends Comparable< (Object> >Iterable< T> values, K? accessor(T value)) → Float64List -
Returns a Float64List with the competition rank of each element in
valuesordered by ascending keyaccessor. -
rankNullable<
T extends Comparable< (Object> >Iterable< T?> values, [num compare(T? a, T? b)?]) → Float64List -
Returns a Float64List with the competition rank of each nullable element
in
values, assigningdouble.nantonullandNaNelements. -
rankWith<
T> (Iterable< T> values, num compare(T a, T b)) → Float64List -
Returns a Float64List with the competition rank of each element in
valuesaccording tocompare. -
reduce<
T, R> (Iterable< T> values, R reducer(R accumulator, T value, int index, Iterable<T> values), R initialValue) → R -
Applies
reduceragainst an accumulator initialized toinitialValueand each element ofvaluesto reduce it to a single value of typeR. -
reduceFirst<
T> (Iterable< T> values, T reducer(T accumulator, T value, int index, Iterable<T> values)) → T? -
Applies
reducertovaluesusing the first element as initial accumulator, or returnsnullifvaluesis empty. -
reverse<
T> (Iterable< T> values) → List<T> -
Returns a new List containing the elements of
valuesin reverse order without mutatingvalues. -
rollup<
T, K, R> (Iterable< T> values, R reduce(List<T> group), K key(T value)) → Map<K, R> -
Groups
valuesbykeyand reduces each group withreduce. -
rollup2<
T, K1, K2, R> (Iterable< T> values, R reduce(List<T> group), K1 key1(T value), K2 key2(T value)) → Map<K1, Map< K2, R> > -
Groups
valuesbykey1andkey2and reduces each leaf group withreduce. -
rollup3<
T, K1, K2, K3, R> (Iterable< T> values, R reduce(List<T> group), K1 key1(T value), K2 key2(T value), K3 key3(T value)) → Map<K1, Map< K2, Map< >K3, R> > -
Groups
valuesbykey1,key2, andkey3and reduces each leaf group withreduce. -
rollupIndexed<
T, K, R> (Iterable< T> values, R reduce(List<T> group), K key(T value, int index, Iterable<T> values)) → Map<K, R> -
Groups
valuesby indexedkeyand reduces each group withreduce. -
rollups<
T, K, R> (Iterable< T> values, R reduce(List<T> group), K key(T value)) → List<(K, R)> -
Groups
valuesbykey, reduces each group withreduce, and returns(key, value)entries. -
rollups2<
T, K1, K2, R> (Iterable< T> values, R reduce(List<T> group), K1 key1(T value), K2 key2(T value)) → List<(K1, List< (K2, R)> )> -
Groups
valuesbykey1andkey2, reduces each leaf group withreduce, and returns nested entry lists. -
rollups3<
T, K1, K2, K3, R> (Iterable< T> values, R reduce(List<T> group), K1 key1(T value), K2 key2(T value), K3 key3(T value)) → List<(K1, List< (K2, List< )>(K3, R)> )> -
Groups
valuesbykey1,key2, andkey3, reduces each leaf group withreduce, and returns nested entry lists. -
rollupsIndexed<
T, K, R> (Iterable< T> values, R reduce(List<T> group), K key(T value, int index, Iterable<T> values)) → List<(K, R)> -
Groups
valuesby indexedkey, reduces each group withreduce, and returns(key, value)entries. -
scan<
T extends Comparable< (Object> >Iterable< T?> values, [num compare(T? a, T? b)?]) → int? -
Deprecated alias for leastIndex returning
nullinstead of-1when no comparable element exists. -
scanWith<
T> (Iterable< T> values, num compare(T a, T b)) → int? -
Deprecated comparator form of scan for arbitrary types
T. -
shuffle<
T> (List< T> array, [int i0 = 0, int? i1]) → List<T> -
Randomizes the order of
arrayin-place over[i0, i1)using the Fisher-Yates shuffle and returnsarray. -
shuffler(
double random()) → Shuffler -
Returns a Shuffler backed by the specified
randomgenerator. -
some<
T> (Iterable< T> values, bool test(T value, int index, Iterable<T> values)) → bool -
Returns
trueiftestreturnstruefor at least one element ofvalues. -
sort<
T extends Comparable< (Object> >Iterable< T> values, [num compare(T a, T b)?]) → List<T> -
Returns a sorted copy of
valuesin ascending natural order (or usingcompare), placingNaNvalues last. -
sortBy<
T, K extends Comparable< (Object> >Iterable< T> values, K? accessor(T value)) → List<T> -
Returns a sorted copy of
valuesordered by ascending keyaccessor, placingnullandNaNkeys last while preserving stability. -
sortBy2<
T, K1 extends Comparable< (Object> , K2 extends Comparable<Object> >Iterable< T> values, K1? key1(T value), K2? key2(T value)) → List<T> -
Returns a sorted copy of
valuesordered bykey1, thenkey2. -
sortBy3<
T, K1 extends Comparable< (Object> , K2 extends Comparable<Object> , K3 extends Comparable<Object> >Iterable< T> values, K1? key1(T value), K2? key2(T value), K3? key3(T value)) → List<T> -
Returns a sorted copy of
valuesordered bykey1, thenkey2, thenkey3. -
sortByAll<
T, K extends Comparable< (Object> >Iterable< T> values, List<K? Function(T value)> accessors) → List<T> -
Returns a sorted copy of
valuesordered by a homogeneous list ofaccessorsin priority order. -
sortNullable<
T extends Comparable< (Object> >Iterable< T?> values, [num compare(T? a, T? b)?]) → List<T?> -
Returns a sorted copy of nullable
valuesin ascending natural order (or usingcompare), placingnullandNaNvalues last while preserving ES2019 stability. -
sortWith<
T> (Iterable< T> values, num compare(T a, T b)) → List<T> -
Returns a sorted copy of
valuesaccording tocompare, placing unorderable elements last while preserving ES2019 stability. -
subset<
T> (Iterable< T> values, Iterable<T> other) → bool -
Returns
trueifvaluesis a subset ofother(every value invaluesalso appears inother). -
sum(
Iterable< num?> values) → double -
Returns the sum of the given numeric
values, ignoringnullandNaN. Returns0.0ifvaluescontains no valid numbers. -
sumBy<
T> (Iterable< T> values, num? valueof(T value)) → double -
Returns the sum of numeric values extracted from
valuesusingvalueof. -
sumByIndexed<
T> (Iterable< T> values, num? valueof(T value, int index, Iterable<T> values)) → double -
Returns the sum of numeric values extracted from
valuesusing indexedvalueof. -
superset<
T> (Iterable< T> values, Iterable<T> other) → bool -
Returns
trueifvaluesis a superset ofother(every value inotheralso appears invalues), lazily consumingvalues. -
thresholdFreedmanDiaconis(
Iterable< num?> values, num min, num max) → int - Returns the number of bins according to the Freedman-Diaconis rule.
-
thresholdScott(
Iterable< num?> values, num min, num max) → int - Returns the number of bins according to Scott's normal reference rule.
-
thresholdSturges(
Iterable< num?> values, [num? min, num? max]) → int - Returns the number of bins according to Sturges' formula.
-
tickIncrement(
num start, num stop, num count) → double -
Returns the tick increment for
start,stop, andcount(negative when the step is< 1, representing-1 / step). -
ticks(
num start, num stop, num count) → List< double> -
Returns approximately
count+ 1 uniformly-spaced, nicely-rounded values betweenstartandstop(inclusive). -
tickStep(
num start, num stop, num count) → double -
Returns the signed difference between adjacent tick values for
start,stop, andcount. -
transpose<
T> (List< List< matrix) → List<T> >List< T> > -
Transposes the specified
matrixof lists, truncating to the shortest row. -
union<
T> (Iterable< Iterable< others) → Set<T> >T> -
Returns a new Set containing every distinct value that appears in any of
others, preserving first-seen order (withSameValueZeroNaNdeduplication). -
union2<
T> (Iterable< T> a, Iterable<T> b) → Set<T> -
Returns a new Set containing every distinct value in
aorb. -
variance(
Iterable< num?> values) → double? -
Returns the unbiased sample variance (Bessel's correction) of
valuesusing Welford's algorithm, ignoringnullandNaN, ornullif fewer than 2 valid numbers exist. -
varianceBy<
T> (Iterable< T> values, num? valueof(T value)) → double? -
Returns the sample variance of numeric values extracted from
valuesusingvalueof. -
varianceByIndexed<
T> (Iterable< T> values, num? valueof(T value, int index, Iterable<T> values)) → double? -
Returns the sample variance of numeric values extracted from
valuesusing indexedvalueof. -
zip<
T> (List< List< arrays) → List<T> >List< T> > -
Returns a list of lists where the
i-th list contains thei-th element from each list inarrays, truncated to the shortest list. -
zip2<
A, B> (List< A> a, List<B> b) → List<(A, B)> -
Zips two lists
aandbinto a list of(A, B)records, truncated to the shorter list. -
zip3<
A, B, C> (List< A> a, List<B> b, List<C> c) → List<(A, B, C)> -
Zips three lists
a,b, andcinto a list of(A, B, C)records, truncated to the shortest list.
Typedefs
-
BinDomainAccessor
= (double, double)? Function(List<
double?> values) -
Accessor computing the
[min, max]binning domain from extracted values. -
BinThresholdCount
= int Function(List<
double?> values, double min, double max) - Callback computing an approximate threshold count from extracted values.
-
BinThresholdValues
= List<
double> Function(List<double?> values, double min, double max) - Callback computing explicit threshold boundaries from extracted values.
-
BinValueAccessor<
T> = num? Function(T value, int index, List< T> data) -
Accessor extracting a numeric value for binning from a datum of type
T.