@thi.ng/vectors
Version:
Optimized 2d/3d/4d and arbitrary length vector operations, support for memory mapping/layouts
48 lines • 1.94 kB
TypeScript
import type { IRandom } from "@thi.ng/random";
import type { VecOpSFN, VecOpSGFN, VecOpSGOO, VecOpSGOOO, VecOpSGVVO, VecOpSOO, VecOpSOOO, VecOpSVVO } from "./api.js";
/**
* Randomizes `v` with each component in interval `[n..m)`. If no `rnd`
* instance is given, uses [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html), i.e.
* `Math.random`.
*
* @param v -
* @param n - default -1
* @param m - default 1
* @param rnd -
* @param ia -
* @param sa -
*/
export declare const randomS: VecOpSGOOO<number, number, IRandom>, randomS2: VecOpSOOO<number, number, IRandom>, randomS3: VecOpSOOO<number, number, IRandom>, randomS4: VecOpSOOO<number, number, IRandom>;
export declare const randomDistribS: VecOpSGFN, randomDistribS2: VecOpSFN, randomDistribS3: VecOpSFN, randomDistribS4: VecOpSFN;
/**
* Sets `v` to random strided vector, normalized to length `n` (default: 1). If
* no `rnd` instance is given, uses
* [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html), i.e.
* `Math.random`.
*
* @param v -
* @param num -
* @param n -
* @param rnd -
* @param ia -
* @param sa -
*/
export declare const randNormS: VecOpSGOO<number, IRandom>;
export declare const randNormS2: VecOpSOO<number, IRandom>;
export declare const randNormS3: VecOpSOO<number, IRandom>;
export declare const randNormS4: VecOpSOO<number, IRandom>;
export declare const randNormDistribS: VecOpSGFN;
export declare const randNormDistribS2: VecOpSFN;
export declare const randNormDistribS3: VecOpSFN;
export declare const randNormDistribS4: VecOpSFN;
/**
* Sets `out` to random vector with each component in the semi-open
* interval defined by [min,max).
*
* @param out -
* @param min -
* @param max -
* @param rnd -
*/
export declare const randMinMaxS: VecOpSGVVO<IRandom>, randMinMaxS2: VecOpSVVO<IRandom>, randMinMaxS3: VecOpSVVO<IRandom>, randMinMaxS4: VecOpSVVO<IRandom>;
//# sourceMappingURL=randoms.d.ts.map