type f64 = number; type i32 = number; /** An axis-aligned integration bound `[lo, hi]`. */ export type Bound = readonly [f64, f64]; /** Options for {@link monteCarloIntegrate}. */ export interface MonteCarloOptions { /** Number of sample points (default 1e5). */ n?: i32; /** Sampling method (default `'uniform'`). */ method?: 'uniform' | 'halton' | 'sobol'; /** Seed for the deterministic RNG, `method: 'uniform'` only (reproducible * draws). Omit for a time-seeded, non-reproducible generator. */ seed?: string | number; } /** Result of {@link monteCarloIntegrate}. */ export interface MonteCarloResult { /** The estimated integral. */ estimate: f64; /** Standard error of `estimate` (uniform MC only; 0 for QMC methods — * see the module doc). */ stderr: f64; } /** * Estimate `∫ f` over the axis-aligned box `bounds` (one `[lo, hi]` pair * per dimension) by Monte-Carlo or quasi-Monte-Carlo sampling. * * @example * monteCarloIntegrate((x) => x[0] ** 2, [[0, 1]], { n: 1e5, seed: 42 }); * // estimate ~ 1/3, stderr ~ 6e-4 * * @example * // unit-disk area via the indicator function, ~ pi * monteCarloIntegrate((x) => (x[0] ** 2 + x[1] ** 2 <= 1 ? 1 : 0), [ * [-1, 1], * [-1, 1], * ]); */ export declare function monteCarloIntegrate(f: (x: f64[]) => f64, bounds: readonly Bound[], opts?: MonteCarloOptions): MonteCarloResult; export {}; //# sourceMappingURL=monte-carlo.d.ts.map