vek-engine
Version:
Efficient WebAssembly-based vector math engine for JavaScript/TypeScript
829 lines • 517 kB
text/typescript
/**
***********************************************************************
* Copyright 2022-present Jonathan Barronville *
* *
* This Source Code Form is subject to the terms of the Mozilla Public *
* License, v. 2.0. If a copy of the MPL was not distributed with this *
* file, You can obtain one at https://mozilla.org/MPL/2.0/. *
***********************************************************************
*/
import { createClass } from './vector-factory.mjs';
import type { VectorModalityT } from './vector-factory.mjs';
import { VectorModalityType } from './vector-factory.mjs';
import type { VectorOptionsT } from './vector-factory.mjs';
import { VectorPrecision } from './vector-factory.mjs';
declare const v: (...args: [dimensions: number, precision?: VectorPrecision | undefined, options?: Partial<{
disableArrayIndexing: boolean;
}> | undefined] | [array: number[], precision?: VectorPrecision | undefined, options?: Partial<{
disableArrayIndexing: boolean;
}> | undefined] | [buffer: Uint8Array, options?: Partial<{
disableArrayIndexing: boolean;
}> | undefined] | [array: Float32Array, options?: Partial<{
disableArrayIndexing: boolean;
}> | undefined] | [array: Float64Array, options?: Partial<{
disableArrayIndexing: boolean;
}> | undefined]) => {
___nativePointer: import("../dist-wasm/debug.js").__Internref4;
readonly dimensions: number;
disableArrayIndexing: boolean | null;
readonly elementByteSize: 4 | 8;
readonly is64Bit: boolean;
readonly isDebugModeActive: boolean;
readonly maxIndex: number;
readonly nativePointer: import("../dist-wasm/debug.js").__Internref4;
readonly precision: VectorPrecision;
readonly wasmMemory: WebAssembly.Memory;
readonly wasmModule: Readonly<{
vectorCreate(dimensions: number, elementByteSize: number): import("../dist-wasm/debug.js").__Internref4;
vectorInstanceArithmeticMean(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceFill(vector: import("../dist-wasm/debug.js").__Internref4, value: number): void;
vectorInstanceGeometricMean(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetDimensions(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetElementByteSize(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetIs64Bit(vector: import("../dist-wasm/debug.js").__Internref4): boolean;
vectorInstanceGetMaxIndex(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetValue(vector: import("../dist-wasm/debug.js").__Internref4, index: number): number;
vectorInstanceIndexOfMax(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceIndexOfMin(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceInfinityNorm(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMax(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMin(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMode(vector: import("../dist-wasm/debug.js").__Internref4): Float64Array;
vectorInstanceNeg(vector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorInstancePNorm(vector: import("../dist-wasm/debug.js").__Internref4, p: number): number;
vectorInstanceSetValue(vector: import("../dist-wasm/debug.js").__Internref4, index: number, value: number): boolean;
vectorInstanceSum(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceToBuffer(vector: import("../dist-wasm/debug.js").__Internref4): ArrayBuffer;
vectorStaticAdd(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticCmp(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): ArrayBuffer;
vectorStaticCosineSimilarity(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): number;
vectorStaticDiv(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticDot(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): number;
vectorStaticFromBuffer(buffer: ArrayBuffer): import("../dist-wasm/debug.js").__Internref4;
vectorStaticMod(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticMul(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticOnes(dimensions: number, elementByteSize: number): import("../dist-wasm/debug.js").__Internref4;
vectorStaticSub(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorIteratorCreate(vector: import("../dist-wasm/debug.js").__Internref4): import("../dist-wasm/debug.js").__Internref18;
vectorIteratorInstanceNext(iterator: import("../dist-wasm/debug.js").__Internref18): import("../dist-wasm/debug.js").__Record19<never>;
}>;
add(otherVector: any): any;
arithmeticMean(): number;
average(): number;
avg(): number;
clone(): any;
cosineSimilarity(otherVector: any): number;
div(otherVector: any): any;
divide(otherVector: any): any;
dot(otherVector: any): number;
dotProduct(otherVector: any): number;
each(callback: (value: number, index: number, vector: any) => void): void;
eq(otherVector: any): boolean[];
equals(otherVector: any): boolean[];
euclideanNorm(): number;
fill(value: number): any;
forEach(callback: (value: number, index: number, vector: any) => void): void;
ge(otherVector: any): boolean[];
get(index: number): number | null;
geometricMean(): number;
greaterThan(otherVector: any): boolean[];
greaterThanOrEquals(otherVector: any): boolean[];
gt(otherVector: any): boolean[];
idxmax(): number;
idxmin(): number;
indexOfMax(): number;
indexOfMin(): number;
infinityNorm(): number;
innerProduct(otherVector: any): number;
isBimodal(): boolean;
isMultimodal(): boolean;
isNullimodal(): boolean;
isUnimodal(): boolean;
l1Norm(): number;
l2Norm(): number;
le(otherVector: any): boolean[];
lessThan(otherVector: any): boolean[];
lessThanOrEquals(otherVector: any): boolean[];
lInfinityNorm(): number;
lt(otherVector: any): boolean[];
manhattanNorm(): number;
map(callback: (value: number, index: number, vector: any) => number): any;
max(): number;
maximum(): number;
maxNorm(): number;
mean(): number;
min(): number;
minimum(): number;
mod(otherVector: any): any;
modality(): Readonly<{
type: VectorModalityType.NULLIMODAL;
}> | Readonly<{
type: VectorModalityType.UNIMODAL;
value: number;
}> | Readonly<{
type: VectorModalityType.BIMODAL;
values: readonly [number, number];
}> | Readonly<{
type: VectorModalityType.MULTIMODAL;
values: readonly number[];
}>;
modalityType(): VectorModalityType;
mode(): number | readonly number[];
modulo(otherVector: any): any;
mul(otherVector: any): any;
multiply(otherVector: any): any;
ne(otherVector: any): boolean[];
neg(): any;
negate(): any;
notEquals(otherVector: any): boolean[];
pNorm(p: 2 | 1): number;
scalarProduct(otherVector: any): number;
set(index: number, value: number): boolean;
sub(otherVector: any): any;
subtract(otherVector: any): any;
sum(): number;
toArray(): number[];
toBuffer(): Uint8Array;
toFloat32Array(): Float32Array;
toFloat64Array(): Float64Array;
toJSON(_key?: unknown): number[];
toString(): string;
valueOf(): string;
[Symbol.iterator](): Generator<number, void, unknown>;
}, Vector: {
new (...args: [dimensions: number, precision?: VectorPrecision | undefined, options?: Partial<{
disableArrayIndexing: boolean;
}> | undefined] | [array: number[], precision?: VectorPrecision | undefined, options?: Partial<{
disableArrayIndexing: boolean;
}> | undefined] | [buffer: Uint8Array, options?: Partial<{
disableArrayIndexing: boolean;
}> | undefined] | [array: Float32Array, options?: Partial<{
disableArrayIndexing: boolean;
}> | undefined] | [array: Float64Array, options?: Partial<{
disableArrayIndexing: boolean;
}> | undefined]): {
___nativePointer: import("../dist-wasm/debug.js").__Internref4;
readonly dimensions: number;
disableArrayIndexing: boolean | null;
readonly elementByteSize: 4 | 8;
readonly is64Bit: boolean;
readonly isDebugModeActive: boolean;
readonly maxIndex: number;
readonly nativePointer: import("../dist-wasm/debug.js").__Internref4;
readonly precision: VectorPrecision;
readonly wasmMemory: WebAssembly.Memory;
readonly wasmModule: Readonly<{
vectorCreate(dimensions: number, elementByteSize: number): import("../dist-wasm/debug.js").__Internref4;
vectorInstanceArithmeticMean(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceFill(vector: import("../dist-wasm/debug.js").__Internref4, value: number): void;
vectorInstanceGeometricMean(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetDimensions(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetElementByteSize(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetIs64Bit(vector: import("../dist-wasm/debug.js").__Internref4): boolean;
vectorInstanceGetMaxIndex(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetValue(vector: import("../dist-wasm/debug.js").__Internref4, index: number): number;
vectorInstanceIndexOfMax(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceIndexOfMin(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceInfinityNorm(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMax(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMin(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMode(vector: import("../dist-wasm/debug.js").__Internref4): Float64Array;
vectorInstanceNeg(vector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorInstancePNorm(vector: import("../dist-wasm/debug.js").__Internref4, p: number): number;
vectorInstanceSetValue(vector: import("../dist-wasm/debug.js").__Internref4, index: number, value: number): boolean;
vectorInstanceSum(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceToBuffer(vector: import("../dist-wasm/debug.js").__Internref4): ArrayBuffer;
vectorStaticAdd(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticCmp(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): ArrayBuffer;
vectorStaticCosineSimilarity(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): number;
vectorStaticDiv(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticDot(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): number;
vectorStaticFromBuffer(buffer: ArrayBuffer): import("../dist-wasm/debug.js").__Internref4;
vectorStaticMod(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticMul(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticOnes(dimensions: number, elementByteSize: number): import("../dist-wasm/debug.js").__Internref4;
vectorStaticSub(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorIteratorCreate(vector: import("../dist-wasm/debug.js").__Internref4): import("../dist-wasm/debug.js").__Internref18;
vectorIteratorInstanceNext(iterator: import("../dist-wasm/debug.js").__Internref18): import("../dist-wasm/debug.js").__Record19<never>;
}>;
add(otherVector: any): any;
arithmeticMean(): number;
average(): number;
avg(): number;
clone(): any;
cosineSimilarity(otherVector: any): number;
div(otherVector: any): any;
divide(otherVector: any): any;
dot(otherVector: any): number;
dotProduct(otherVector: any): number;
each(callback: (value: number, index: number, vector: any) => void): void;
eq(otherVector: any): boolean[];
equals(otherVector: any): boolean[];
euclideanNorm(): number;
fill(value: number): any;
forEach(callback: (value: number, index: number, vector: any) => void): void;
ge(otherVector: any): boolean[];
get(index: number): number | null;
geometricMean(): number;
greaterThan(otherVector: any): boolean[];
greaterThanOrEquals(otherVector: any): boolean[];
gt(otherVector: any): boolean[];
idxmax(): number;
idxmin(): number;
indexOfMax(): number;
indexOfMin(): number;
infinityNorm(): number;
innerProduct(otherVector: any): number;
isBimodal(): boolean;
isMultimodal(): boolean;
isNullimodal(): boolean;
isUnimodal(): boolean;
l1Norm(): number;
l2Norm(): number;
le(otherVector: any): boolean[];
lessThan(otherVector: any): boolean[];
lessThanOrEquals(otherVector: any): boolean[];
lInfinityNorm(): number;
lt(otherVector: any): boolean[];
manhattanNorm(): number;
map(callback: (value: number, index: number, vector: any) => number): any;
max(): number;
maximum(): number;
maxNorm(): number;
mean(): number;
min(): number;
minimum(): number;
mod(otherVector: any): any;
modality(): Readonly<{
type: VectorModalityType.NULLIMODAL;
}> | Readonly<{
type: VectorModalityType.UNIMODAL;
value: number;
}> | Readonly<{
type: VectorModalityType.BIMODAL;
values: readonly [number, number];
}> | Readonly<{
type: VectorModalityType.MULTIMODAL;
values: readonly number[];
}>;
modalityType(): VectorModalityType;
mode(): number | readonly number[];
modulo(otherVector: any): any;
mul(otherVector: any): any;
multiply(otherVector: any): any;
ne(otherVector: any): boolean[];
neg(): any;
negate(): any;
notEquals(otherVector: any): boolean[];
pNorm(p: 2 | 1): number;
scalarProduct(otherVector: any): number;
set(index: number, value: number): boolean;
sub(otherVector: any): any;
subtract(otherVector: any): any;
sum(): number;
toArray(): number[];
toBuffer(): Uint8Array;
toFloat32Array(): Float32Array;
toFloat64Array(): Float64Array;
toJSON(_key?: unknown): number[];
toString(): string;
valueOf(): string;
[Symbol.iterator](): Generator<number, void, unknown>;
};
add(aVector: {
___nativePointer: import("../dist-wasm/debug.js").__Internref4;
readonly dimensions: number;
disableArrayIndexing: boolean | null;
readonly elementByteSize: 4 | 8;
readonly is64Bit: boolean;
readonly isDebugModeActive: boolean;
readonly maxIndex: number;
readonly nativePointer: import("../dist-wasm/debug.js").__Internref4;
readonly precision: VectorPrecision;
readonly wasmMemory: WebAssembly.Memory;
readonly wasmModule: Readonly<{
vectorCreate(dimensions: number, elementByteSize: number): import("../dist-wasm/debug.js").__Internref4;
vectorInstanceArithmeticMean(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceFill(vector: import("../dist-wasm/debug.js").__Internref4, value: number): void;
vectorInstanceGeometricMean(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetDimensions(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetElementByteSize(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetIs64Bit(vector: import("../dist-wasm/debug.js").__Internref4): boolean;
vectorInstanceGetMaxIndex(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetValue(vector: import("../dist-wasm/debug.js").__Internref4, index: number): number;
vectorInstanceIndexOfMax(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceIndexOfMin(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceInfinityNorm(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMax(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMin(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMode(vector: import("../dist-wasm/debug.js").__Internref4): Float64Array;
vectorInstanceNeg(vector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorInstancePNorm(vector: import("../dist-wasm/debug.js").__Internref4, p: number): number;
vectorInstanceSetValue(vector: import("../dist-wasm/debug.js").__Internref4, index: number, value: number): boolean;
vectorInstanceSum(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceToBuffer(vector: import("../dist-wasm/debug.js").__Internref4): ArrayBuffer;
vectorStaticAdd(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticCmp(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): ArrayBuffer;
vectorStaticCosineSimilarity(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): number;
vectorStaticDiv(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticDot(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): number;
vectorStaticFromBuffer(buffer: ArrayBuffer): import("../dist-wasm/debug.js").__Internref4;
vectorStaticMod(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticMul(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticOnes(dimensions: number, elementByteSize: number): import("../dist-wasm/debug.js").__Internref4;
vectorStaticSub(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorIteratorCreate(vector: import("../dist-wasm/debug.js").__Internref4): import("../dist-wasm/debug.js").__Internref18;
vectorIteratorInstanceNext(iterator: import("../dist-wasm/debug.js").__Internref18): import("../dist-wasm/debug.js").__Record19<never>;
}>;
add(otherVector: any): any;
arithmeticMean(): number;
average(): number;
avg(): number;
clone(): any;
cosineSimilarity(otherVector: any): number;
div(otherVector: any): any;
divide(otherVector: any): any;
dot(otherVector: any): number;
dotProduct(otherVector: any): number;
each(callback: (value: number, index: number, vector: any) => void): void;
eq(otherVector: any): boolean[];
equals(otherVector: any): boolean[];
euclideanNorm(): number;
fill(value: number): any;
forEach(callback: (value: number, index: number, vector: any) => void): void;
ge(otherVector: any): boolean[];
get(index: number): number | null;
geometricMean(): number;
greaterThan(otherVector: any): boolean[];
greaterThanOrEquals(otherVector: any): boolean[];
gt(otherVector: any): boolean[];
idxmax(): number;
idxmin(): number;
indexOfMax(): number;
indexOfMin(): number;
infinityNorm(): number;
innerProduct(otherVector: any): number;
isBimodal(): boolean;
isMultimodal(): boolean;
isNullimodal(): boolean;
isUnimodal(): boolean;
l1Norm(): number;
l2Norm(): number;
le(otherVector: any): boolean[];
lessThan(otherVector: any): boolean[];
lessThanOrEquals(otherVector: any): boolean[];
lInfinityNorm(): number;
lt(otherVector: any): boolean[];
manhattanNorm(): number;
map(callback: (value: number, index: number, vector: any) => number): any;
max(): number;
maximum(): number;
maxNorm(): number;
mean(): number;
min(): number;
minimum(): number;
mod(otherVector: any): any;
modality(): Readonly<{
type: VectorModalityType.NULLIMODAL;
}> | Readonly<{
type: VectorModalityType.UNIMODAL;
value: number;
}> | Readonly<{
type: VectorModalityType.BIMODAL;
values: readonly [number, number];
}> | Readonly<{
type: VectorModalityType.MULTIMODAL;
values: readonly number[];
}>;
modalityType(): VectorModalityType;
mode(): number | readonly number[];
modulo(otherVector: any): any;
mul(otherVector: any): any;
multiply(otherVector: any): any;
ne(otherVector: any): boolean[];
neg(): any;
negate(): any;
notEquals(otherVector: any): boolean[];
pNorm(p: 2 | 1): number;
scalarProduct(otherVector: any): number;
set(index: number, value: number): boolean;
sub(otherVector: any): any;
subtract(otherVector: any): any;
sum(): number;
toArray(): number[];
toBuffer(): Uint8Array;
toFloat32Array(): Float32Array;
toFloat64Array(): Float64Array;
toJSON(_key?: unknown): number[];
toString(): string;
valueOf(): string;
[Symbol.iterator](): Generator<number, void, unknown>;
}, bVector: {
___nativePointer: import("../dist-wasm/debug.js").__Internref4;
readonly dimensions: number;
disableArrayIndexing: boolean | null;
readonly elementByteSize: 4 | 8;
readonly is64Bit: boolean;
readonly isDebugModeActive: boolean;
readonly maxIndex: number;
readonly nativePointer: import("../dist-wasm/debug.js").__Internref4;
readonly precision: VectorPrecision;
readonly wasmMemory: WebAssembly.Memory;
readonly wasmModule: Readonly<{
vectorCreate(dimensions: number, elementByteSize: number): import("../dist-wasm/debug.js").__Internref4;
vectorInstanceArithmeticMean(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceFill(vector: import("../dist-wasm/debug.js").__Internref4, value: number): void;
vectorInstanceGeometricMean(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetDimensions(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetElementByteSize(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetIs64Bit(vector: import("../dist-wasm/debug.js").__Internref4): boolean;
vectorInstanceGetMaxIndex(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetValue(vector: import("../dist-wasm/debug.js").__Internref4, index: number): number;
vectorInstanceIndexOfMax(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceIndexOfMin(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceInfinityNorm(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMax(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMin(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMode(vector: import("../dist-wasm/debug.js").__Internref4): Float64Array;
vectorInstanceNeg(vector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorInstancePNorm(vector: import("../dist-wasm/debug.js").__Internref4, p: number): number;
vectorInstanceSetValue(vector: import("../dist-wasm/debug.js").__Internref4, index: number, value: number): boolean;
vectorInstanceSum(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceToBuffer(vector: import("../dist-wasm/debug.js").__Internref4): ArrayBuffer;
vectorStaticAdd(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticCmp(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): ArrayBuffer;
vectorStaticCosineSimilarity(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): number;
vectorStaticDiv(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticDot(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): number;
vectorStaticFromBuffer(buffer: ArrayBuffer): import("../dist-wasm/debug.js").__Internref4;
vectorStaticMod(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticMul(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticOnes(dimensions: number, elementByteSize: number): import("../dist-wasm/debug.js").__Internref4;
vectorStaticSub(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorIteratorCreate(vector: import("../dist-wasm/debug.js").__Internref4): import("../dist-wasm/debug.js").__Internref18;
vectorIteratorInstanceNext(iterator: import("../dist-wasm/debug.js").__Internref18): import("../dist-wasm/debug.js").__Record19<never>;
}>;
add(otherVector: any): any;
arithmeticMean(): number;
average(): number;
avg(): number;
clone(): any;
cosineSimilarity(otherVector: any): number;
div(otherVector: any): any;
divide(otherVector: any): any;
dot(otherVector: any): number;
dotProduct(otherVector: any): number;
each(callback: (value: number, index: number, vector: any) => void): void;
eq(otherVector: any): boolean[];
equals(otherVector: any): boolean[];
euclideanNorm(): number;
fill(value: number): any;
forEach(callback: (value: number, index: number, vector: any) => void): void;
ge(otherVector: any): boolean[];
get(index: number): number | null;
geometricMean(): number;
greaterThan(otherVector: any): boolean[];
greaterThanOrEquals(otherVector: any): boolean[];
gt(otherVector: any): boolean[];
idxmax(): number;
idxmin(): number;
indexOfMax(): number;
indexOfMin(): number;
infinityNorm(): number;
innerProduct(otherVector: any): number;
isBimodal(): boolean;
isMultimodal(): boolean;
isNullimodal(): boolean;
isUnimodal(): boolean;
l1Norm(): number;
l2Norm(): number;
le(otherVector: any): boolean[];
lessThan(otherVector: any): boolean[];
lessThanOrEquals(otherVector: any): boolean[];
lInfinityNorm(): number;
lt(otherVector: any): boolean[];
manhattanNorm(): number;
map(callback: (value: number, index: number, vector: any) => number): any;
max(): number;
maximum(): number;
maxNorm(): number;
mean(): number;
min(): number;
minimum(): number;
mod(otherVector: any): any;
modality(): Readonly<{
type: VectorModalityType.NULLIMODAL;
}> | Readonly<{
type: VectorModalityType.UNIMODAL;
value: number;
}> | Readonly<{
type: VectorModalityType.BIMODAL;
values: readonly [number, number];
}> | Readonly<{
type: VectorModalityType.MULTIMODAL;
values: readonly number[];
}>;
modalityType(): VectorModalityType;
mode(): number | readonly number[];
modulo(otherVector: any): any;
mul(otherVector: any): any;
multiply(otherVector: any): any;
ne(otherVector: any): boolean[];
neg(): any;
negate(): any;
notEquals(otherVector: any): boolean[];
pNorm(p: 2 | 1): number;
scalarProduct(otherVector: any): number;
set(index: number, value: number): boolean;
sub(otherVector: any): any;
subtract(otherVector: any): any;
sum(): number;
toArray(): number[];
toBuffer(): Uint8Array;
toFloat32Array(): Float32Array;
toFloat64Array(): Float64Array;
toJSON(_key?: unknown): number[];
toString(): string;
valueOf(): string;
[Symbol.iterator](): Generator<number, void, unknown>;
}): {
___nativePointer: import("../dist-wasm/debug.js").__Internref4;
readonly dimensions: number;
disableArrayIndexing: boolean | null;
readonly elementByteSize: 4 | 8;
readonly is64Bit: boolean;
readonly isDebugModeActive: boolean;
readonly maxIndex: number;
readonly nativePointer: import("../dist-wasm/debug.js").__Internref4;
readonly precision: VectorPrecision;
readonly wasmMemory: WebAssembly.Memory;
readonly wasmModule: Readonly<{
vectorCreate(dimensions: number, elementByteSize: number): import("../dist-wasm/debug.js").__Internref4;
vectorInstanceArithmeticMean(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceFill(vector: import("../dist-wasm/debug.js").__Internref4, value: number): void;
vectorInstanceGeometricMean(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetDimensions(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetElementByteSize(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetIs64Bit(vector: import("../dist-wasm/debug.js").__Internref4): boolean;
vectorInstanceGetMaxIndex(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetValue(vector: import("../dist-wasm/debug.js").__Internref4, index: number): number;
vectorInstanceIndexOfMax(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceIndexOfMin(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceInfinityNorm(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMax(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMin(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMode(vector: import("../dist-wasm/debug.js").__Internref4): Float64Array;
vectorInstanceNeg(vector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorInstancePNorm(vector: import("../dist-wasm/debug.js").__Internref4, p: number): number;
vectorInstanceSetValue(vector: import("../dist-wasm/debug.js").__Internref4, index: number, value: number): boolean;
vectorInstanceSum(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceToBuffer(vector: import("../dist-wasm/debug.js").__Internref4): ArrayBuffer;
vectorStaticAdd(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticCmp(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): ArrayBuffer;
vectorStaticCosineSimilarity(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): number;
vectorStaticDiv(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticDot(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): number;
vectorStaticFromBuffer(buffer: ArrayBuffer): import("../dist-wasm/debug.js").__Internref4;
vectorStaticMod(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticMul(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticOnes(dimensions: number, elementByteSize: number): import("../dist-wasm/debug.js").__Internref4;
vectorStaticSub(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorIteratorCreate(vector: import("../dist-wasm/debug.js").__Internref4): import("../dist-wasm/debug.js").__Internref18;
vectorIteratorInstanceNext(iterator: import("../dist-wasm/debug.js").__Internref18): import("../dist-wasm/debug.js").__Record19<never>;
}>;
add(otherVector: any): any;
arithmeticMean(): number;
average(): number;
avg(): number;
clone(): any;
cosineSimilarity(otherVector: any): number;
div(otherVector: any): any;
divide(otherVector: any): any;
dot(otherVector: any): number;
dotProduct(otherVector: any): number;
each(callback: (value: number, index: number, vector: any) => void): void;
eq(otherVector: any): boolean[];
equals(otherVector: any): boolean[];
euclideanNorm(): number;
fill(value: number): any;
forEach(callback: (value: number, index: number, vector: any) => void): void;
ge(otherVector: any): boolean[];
get(index: number): number | null;
geometricMean(): number;
greaterThan(otherVector: any): boolean[];
greaterThanOrEquals(otherVector: any): boolean[];
gt(otherVector: any): boolean[];
idxmax(): number;
idxmin(): number;
indexOfMax(): number;
indexOfMin(): number;
infinityNorm(): number;
innerProduct(otherVector: any): number;
isBimodal(): boolean;
isMultimodal(): boolean;
isNullimodal(): boolean;
isUnimodal(): boolean;
l1Norm(): number;
l2Norm(): number;
le(otherVector: any): boolean[];
lessThan(otherVector: any): boolean[];
lessThanOrEquals(otherVector: any): boolean[];
lInfinityNorm(): number;
lt(otherVector: any): boolean[];
manhattanNorm(): number;
map(callback: (value: number, index: number, vector: any) => number): any;
max(): number;
maximum(): number;
maxNorm(): number;
mean(): number;
min(): number;
minimum(): number;
mod(otherVector: any): any;
modality(): Readonly<{
type: VectorModalityType.NULLIMODAL;
}> | Readonly<{
type: VectorModalityType.UNIMODAL;
value: number;
}> | Readonly<{
type: VectorModalityType.BIMODAL;
values: readonly [number, number];
}> | Readonly<{
type: VectorModalityType.MULTIMODAL;
values: readonly number[];
}>;
modalityType(): VectorModalityType;
mode(): number | readonly number[];
modulo(otherVector: any): any;
mul(otherVector: any): any;
multiply(otherVector: any): any;
ne(otherVector: any): boolean[];
neg(): any;
negate(): any;
notEquals(otherVector: any): boolean[];
pNorm(p: 2 | 1): number;
scalarProduct(otherVector: any): number;
set(index: number, value: number): boolean;
sub(otherVector: any): any;
subtract(otherVector: any): any;
sum(): number;
toArray(): number[];
toBuffer(): Uint8Array;
toFloat32Array(): Float32Array;
toFloat64Array(): Float64Array;
toJSON(_key?: unknown): number[];
toString(): string;
valueOf(): string;
[Symbol.iterator](): Generator<number, void, unknown>;
};
cosineSimilarity(aVector: {
___nativePointer: import("../dist-wasm/debug.js").__Internref4;
readonly dimensions: number;
disableArrayIndexing: boolean | null;
readonly elementByteSize: 4 | 8;
readonly is64Bit: boolean;
readonly isDebugModeActive: boolean;
readonly maxIndex: number;
readonly nativePointer: import("../dist-wasm/debug.js").__Internref4;
readonly precision: VectorPrecision;
readonly wasmMemory: WebAssembly.Memory;
readonly wasmModule: Readonly<{
vectorCreate(dimensions: number, elementByteSize: number): import("../dist-wasm/debug.js").__Internref4;
vectorInstanceArithmeticMean(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceFill(vector: import("../dist-wasm/debug.js").__Internref4, value: number): void;
vectorInstanceGeometricMean(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetDimensions(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetElementByteSize(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetIs64Bit(vector: import("../dist-wasm/debug.js").__Internref4): boolean;
vectorInstanceGetMaxIndex(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetValue(vector: import("../dist-wasm/debug.js").__Internref4, index: number): number;
vectorInstanceIndexOfMax(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceIndexOfMin(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceInfinityNorm(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMax(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMin(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceMode(vector: import("../dist-wasm/debug.js").__Internref4): Float64Array;
vectorInstanceNeg(vector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorInstancePNorm(vector: import("../dist-wasm/debug.js").__Internref4, p: number): number;
vectorInstanceSetValue(vector: import("../dist-wasm/debug.js").__Internref4, index: number, value: number): boolean;
vectorInstanceSum(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceToBuffer(vector: import("../dist-wasm/debug.js").__Internref4): ArrayBuffer;
vectorStaticAdd(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticCmp(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): ArrayBuffer;
vectorStaticCosineSimilarity(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): number;
vectorStaticDiv(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticDot(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4): number;
vectorStaticFromBuffer(buffer: ArrayBuffer): import("../dist-wasm/debug.js").__Internref4;
vectorStaticMod(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticMul(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorStaticOnes(dimensions: number, elementByteSize: number): import("../dist-wasm/debug.js").__Internref4;
vectorStaticSub(aVector: import("../dist-wasm/debug.js").__Internref4, bVector: import("../dist-wasm/debug.js").__Internref4, resultVector: import("../dist-wasm/debug.js").__Internref4): void;
vectorIteratorCreate(vector: import("../dist-wasm/debug.js").__Internref4): import("../dist-wasm/debug.js").__Internref18;
vectorIteratorInstanceNext(iterator: import("../dist-wasm/debug.js").__Internref18): import("../dist-wasm/debug.js").__Record19<never>;
}>;
add(otherVector: any): any;
arithmeticMean(): number;
average(): number;
avg(): number;
clone(): any;
cosineSimilarity(otherVector: any): number;
div(otherVector: any): any;
divide(otherVector: any): any;
dot(otherVector: any): number;
dotProduct(otherVector: any): number;
each(callback: (value: number, index: number, vector: any) => void): void;
eq(otherVector: any): boolean[];
equals(otherVector: any): boolean[];
euclideanNorm(): number;
fill(value: number): any;
forEach(callback: (value: number, index: number, vector: any) => void): void;
ge(otherVector: any): boolean[];
get(index: number): number | null;
geometricMean(): number;
greaterThan(otherVector: any): boolean[];
greaterThanOrEquals(otherVector: any): boolean[];
gt(otherVector: any): boolean[];
idxmax(): number;
idxmin(): number;
indexOfMax(): number;
indexOfMin(): number;
infinityNorm(): number;
innerProduct(otherVector: any): number;
isBimodal(): boolean;
isMultimodal(): boolean;
isNullimodal(): boolean;
isUnimodal(): boolean;
l1Norm(): number;
l2Norm(): number;
le(otherVector: any): boolean[];
lessThan(otherVector: any): boolean[];
lessThanOrEquals(otherVector: any): boolean[];
lInfinityNorm(): number;
lt(otherVector: any): boolean[];
manhattanNorm(): number;
map(callback: (value: number, index: number, vector: any) => number): any;
max(): number;
maximum(): number;
maxNorm(): number;
mean(): number;
min(): number;
minimum(): number;
mod(otherVector: any): any;
modality(): Readonly<{
type: VectorModalityType.NULLIMODAL;
}> | Readonly<{
type: VectorModalityType.UNIMODAL;
value: number;
}> | Readonly<{
type: VectorModalityType.BIMODAL;
values: readonly [number, number];
}> | Readonly<{
type: VectorModalityType.MULTIMODAL;
values: readonly number[];
}>;
modalityType(): VectorModalityType;
mode(): number | readonly number[];
modulo(otherVector: any): any;
mul(otherVector: any): any;
multiply(otherVector: any): any;
ne(otherVector: any): boolean[];
neg(): any;
negate(): any;
notEquals(otherVector: any): boolean[];
pNorm(p: 2 | 1): number;
scalarProduct(otherVector: any): number;
set(index: number, value: number): boolean;
sub(otherVector: any): any;
subtract(otherVector: any): any;
sum(): number;
toArray(): number[];
toBuffer(): Uint8Array;
toFloat32Array(): Float32Array;
toFloat64Array(): Float64Array;
toJSON(_key?: unknown): number[];
toString(): string;
valueOf(): string;
[Symbol.iterator](): Generator<number, void, unknown>;
}, bVector: {
___nativePointer: import("../dist-wasm/debug.js").__Internref4;
readonly dimensions: number;
disableArrayIndexing: boolean | null;
readonly elementByteSize: 4 | 8;
readonly is64Bit: boolean;
readonly isDebugModeActive: boolean;
readonly maxIndex: number;
readonly nativePointer: import("../dist-wasm/debug.js").__Internref4;
readonly precision: VectorPrecision;
readonly wasmMemory: WebAssembly.Memory;
readonly wasmModule: Readonly<{
vectorCreate(dimensions: number, elementByteSize: number): import("../dist-wasm/debug.js").__Internref4;
vectorInstanceArithmeticMean(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceFill(vector: import("../dist-wasm/debug.js").__Internref4, value: number): void;
vectorInstanceGeometricMean(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetDimensions(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetElementByteSize(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetIs64Bit(vector: import("../dist-wasm/debug.js").__Internref4): boolean;
vectorInstanceGetMaxIndex(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceGetValue(vector: import("../dist-wasm/debug.js").__Internref4, index: number): number;
vectorInstanceIndexOfMax(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceIndexOfMin(vector: import("../dist-wasm/debug.js").__Internref4): number;
vectorInstanceInfinityNorm(vector: i