How to use the ts-gaussian.Gaussian function in ts-gaussian

To help you get started, we’ve selected a few ts-gaussian examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MikeHopcroft / route13 / src / generators / transfer-generator.ts View on Github external
constructor(
        arrivalCount: number,
        earliestArrivalTime: SimTime,
        latestArrivalTime: SimTime,
        turnAroundTime: SimTime,
        minConnectionTime: SimTime,
        maxItemsPerTransfer: number
    ) {
        this.minConnectionTime = minConnectionTime;
        this.maxItemsPerTransfer = maxItemsPerTransfer;
        this.turnAroundTime = turnAroundTime;

        this.distribution = new Gaussian(minConnectionTime * 1.5, 25 * minConnectionTime * minConnectionTime);
        this.random = seedrandom('seed1');
        this.berthFactory = new IdFactory();
        this.journeyFactory = new IdFactory();
        this.jobFactory = new JobFactory();
        this.clock = new Clock();

        this.arrivals = [];
        this.departures = [];
        this.turnArounds = [];

        this.berths = [];

        this.transfers = [];

        // Create random arrivals.
        for (let i = 0; i < arrivalCount; ++i) {
github CristianAbrante / GeneticsJS / src / lib / generator / utils / Generator.ts View on Github external
public static generateNormalDistributionValue(
    mean: number = 0.0,
    stdVar: number = 1.0,
    engine: Engine = Generator.DEFAULT_ENGINE,
  ): number {
    const dist = new Gaussian(mean, stdVar);
    return dist.ppf(this.generateProbability(engine));
  }

ts-gaussian

A TypeScript model of a Gaussian distribution

MIT
Latest version published 1 year ago

Package Health Score

48 / 100
Full package analysis

Popular ts-gaussian functions