Classes
Methods
(static) unserialize(runs, indices, indices) → {FindNearestNeighborsResults}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
runs |
Int32WasmArray | Array | TypedArray | An array of length equal to |
indices |
Int32WasmArray | Array | TypedArray | An array of length equal to |
indices |
Float64WasmArray | Array | TypedArray | An array of length equal to |
Returns:
Object containing the unserialized search results.
free()
- Source:
Returns:
Frees the memory allocated on the Wasm heap for this object. This invalidates this object and all references to it.
numberOfCells() → {number}
- Source:
Returns:
The number of cells used in the search.
- Type
- number
numberOfNeighbors() → {number}
- Source:
Returns:
Number of neighbors that were requested in the search.
- Type
- number
serialize(optionsopt) → {object}
- Source:
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
An object is returned with the runs
, indices
and distances
keys, each with an appropriate TypedArray as the value.
If all of the arguments are non-null
, the TypedArrays in the returned object are views on the corresponding input WasmArrays.
Note that these views may be invalidated on the next allocation on the Wasm heap.
If only some of the arguments are non-null
, an error is raised.
- Type
- object
size(optionsopt) → {number}
- Source:
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
The total number of neighbors across all cells. This is usually the product of the number of neighbors and the number of cells.
- Type
- number