@types/d3-array
Advanced tools
Comparing version 3.0.9 to 3.2.0
@@ -1,2 +0,2 @@ | ||
// Last module patch version validated against: 3.1.6 | ||
// Last module patch version validated against: 3.2.4 | ||
@@ -20,2 +20,12 @@ // -------------------------------------------------------------------------- | ||
/** | ||
* Administrivia: a matrix of numeric values. | ||
* If height is not specified, it is inferred from the given width and data.length. | ||
*/ | ||
export interface Matrix { | ||
data: ArrayLike<number>; | ||
width: number; | ||
height?: number; | ||
} | ||
/** | ||
* Represents a nested/recursive InternMap type | ||
@@ -201,2 +211,14 @@ * | ||
/** | ||
* Like median, but returns the index of the element to the left of the median. | ||
*/ | ||
export function medianIndex(iterable: Iterable<Numeric | undefined | null>): number; | ||
/** | ||
* Like median, but returns the index of the element to the left of the median. | ||
*/ | ||
export function medianIndex<T>( | ||
iterable: Iterable<T>, | ||
accessor: (element: T, i: number, array: Iterable<T>) => number | undefined | null, | ||
): number; | ||
/** | ||
* Returns the cumulative sum of the given iterable of numbers, as a Float64Array of the same length. | ||
@@ -237,2 +259,15 @@ * If the iterable contains no numbers, returns zeros. | ||
/** | ||
* Similar to quantile, but returns the index to the left of p. | ||
*/ | ||
export function quantileIndex(iterable: Iterable<Numeric | undefined | null>, p: number): number; | ||
/** | ||
* Similar to quantile, but returns the index to the left of p. | ||
*/ | ||
export function quantileIndex<T>( | ||
iterable: Iterable<T>, | ||
p: number, | ||
accessor: (element: T, i: number, array: Iterable<T>) => number | undefined | null, | ||
): number; | ||
/** | ||
* Similar to quantile, but expects the input to be a sorted array of values. | ||
@@ -770,2 +805,29 @@ * In contrast with quantile, the accessor is only called on the elements needed to compute the quantile. | ||
// -------------------------------------------------------------------------------------- | ||
// Blur | ||
// -------------------------------------------------------------------------------------- | ||
/** | ||
* Blurs an array of data in-place by applying three iterations of a moving average transform (box filter) | ||
* for a fast approximation of a Gaussian kernel of the given radius, a non-negative number. | ||
* Returns the given data. | ||
*/ | ||
export function blur(data: ArrayLike<number>, radius: number): ArrayLike<number>; | ||
/** | ||
* Blurs a matrix of the given width and height in-place by applying a horizontal blur of radius rx | ||
* and a vertical blur of radius ry (which defaults to rx). | ||
* The matrix values data are stored in a flat (one-dimensional) array. | ||
* If height is not specified, it is inferred from the given width and data.length. | ||
* Returns the blurred matrix {data, width, height}. | ||
*/ | ||
export function blur2(data: Matrix, rx: number, ry?: number): Matrix; | ||
/** | ||
* Blurs the given ImageData in-place, blurring each of the RGBA layers independently by applying an horizontal blur of radius rx | ||
* and a vertical blur of radius ry (which defaults to rx). | ||
* Returns the blurred ImageData. | ||
*/ | ||
export function blurImage(imageData: ImageData, rx: number, ry?: number): ImageData; | ||
// -------------------------------------------------------------------------------------- | ||
// Iterables | ||
@@ -772,0 +834,0 @@ // -------------------------------------------------------------------------------------- |
{ | ||
"name": "@types/d3-array", | ||
"version": "3.0.9", | ||
"version": "3.2.0", | ||
"description": "TypeScript definitions for d3-array", | ||
@@ -53,4 +53,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-array", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "3367d76c76c9b00017a7ac1333a39359a7e73a1b32613593fbf238fd1276b231", | ||
"typesPublisherContentHash": "477e713861806dd2b7e17805e1df6c22bf4d0e4fea90f47d9edcda5e70922598", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Wed, 18 Oct 2023 00:05:18 GMT | ||
* Last updated: Fri, 03 Nov 2023 08:17:50 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ |
51404
977