UNPKG

hilbert-wasm

Version:

wasm bindings for Paul Cernoch's rust implementation of Skilling's algorithm for the Hilbert curve

47 lines (42 loc) 1.61 kB
/* tslint:disable */ /* eslint-disable */ /** * @param {string} hilbert_index * @param {number} bits * @param {number} dimensions * @returns {Uint32Array} */ export function hilbert_axes_wasm_from_str(hilbert_index: string, bits: number, dimensions: number): Uint32Array; /** * @param {Uint32Array} hilbert_axes * @param {number} bits * @returns {string} */ export function hilbert_index_wasm_to_str(hilbert_axes: Uint32Array, bits: number): string; export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; export interface InitOutput { readonly memory: WebAssembly.Memory; readonly hilbert_axes_wasm_from_str: (a: number, b: number, c: number, d: number, e: number) => void; readonly hilbert_index_wasm_to_str: (a: number, b: number, c: number, d: number) => void; readonly __wbindgen_add_to_stack_pointer: (a: number) => number; readonly __wbindgen_malloc: (a: number) => number; readonly __wbindgen_realloc: (a: number, b: number, c: number) => number; readonly __wbindgen_free: (a: number, b: number) => void; } /** * Synchronously compiles the given `bytes` and instantiates the WebAssembly module. * * @param {BufferSource} bytes * * @returns {InitOutput} */ export function initSync(bytes: BufferSource): InitOutput; /** * If `module_or_path` is {RequestInfo} or {URL}, makes a request and * for everything else, calls `WebAssembly.instantiate` directly. * * @param {InitInput | Promise<InitInput>} module_or_path * * @returns {Promise<InitOutput>} */ export default function init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;