Functions
checkEquivShapes
- checkEquivShapes(a: ReadonlyArray<number>, b: ReadonlyArray<number>): boolean
-
Parameters
-
a: ReadonlyArray<number>
-
b: ReadonlyArray<number>
Returns boolean
compareShapes
- compareShapes(a: ReadonlyArray<number>, b: ReadonlyArray<number>): boolean
-
Parameters
-
a: ReadonlyArray<number>
-
b: ReadonlyArray<number>
Returns boolean
computeStrides
- computeStrides(shape: ReadonlyArray<number>): any[]
-
Parameters
-
shape: ReadonlyArray<number>
Returns any[]
decrementIndex
- decrementIndex(index: number[], shape: readonly number[]): void
-
Parameters
-
index: number[]
-
shape: readonly number[]
Returns void
getSize
- getSize(shape: ReadonlyArray<number>, zeroSize?: number): number
-
Parameters
-
shape: ReadonlyArray<number>
-
zeroSize: number = 0
Returns number
incrementIndex
- incrementIndex(index: number[], shape: readonly number[]): void
-
Parameters
-
index: number[]
-
shape: readonly number[]
Returns void
indexToPos
- indexToPos(index: ReadonlyArray<number>, strides: ReadonlyArray<number>, shape?: ReadonlyArray<number>): number
-
Parameters
-
index: ReadonlyArray<number>
-
strides: ReadonlyArray<number>
-
Optional shape: ReadonlyArray<number>
Returns number
posToIndex
- posToIndex(pos: number, strides: ReadonlyArray<number>): number[]
-
Parameters
-
pos: number
-
strides: ReadonlyArray<number>
Returns number[]