/** * @license * Copyright 2021, JsData. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ========================================================================== */ export declare function _prng_restore(prng: any, xg: any, opts: any): void; export declare function alea(seed?: any, opts?: any): () => number; export declare type int = number; /** * Creates a new random number generator, optionally using the given seed. * * @param seed (Optional) the seed to be used. * @returns A new RNG method which returns floats from range `[0,1)`. */ export declare const createRng: (seed?: number | undefined) => () => number; /** * Take a uniform [0,1) random number generator (RNG) function and turns it into an * integer RNG function. * * @param rand An RNG in the range of [0,1). * @returns An RNG that takes an integer range (from, until) as arguments and returns * a random integer in the range [from, until). */ export declare const randInt: (rand: () => number) => (from: int, until: int) => number; /** * Generates a random latin hypercube sampling, i.e. unique samples whose * features are evenly distributed over the range `[0,1)`. Latin hypercube * sampling is useful to create random non-duplicate samples that are * somewhat evenly distribute in the `[0,1)**nFeatures` hypercube. * * @see {@link https://en.wikipedia.org/wiki/Latin_hypercube_sampling} */ export declare const lhs: (rand: () => number) => (nSamples: int, nFeatures: int) => Float64Array[]; interface Indexable { [i: number]: T; readonly length: number; } export declare const shuffle: (rand: () => number) => (array: Indexable) => void; export {};