/** * Generates samples from a multivariate triangular distribution (possibly asymmetric) * with the given means and covariance matrix. * * The noise components follow a triangular distribution standardised to mean 0 and * variance 1, so the samples have exactly the requested mean and covariance. * * @param {number[]} means - Array of means (μ) for each dimension. * @param {number[][]} covariance - Covariance matrix (Σ). Must be symmetric positive * semi-definite and match `means`. * @param {number} [alpha=0] - Asymmetry parameter in [-1, 1]: * - 0 → symmetric * - < 0 → skewed left * - > 0 → skewed right * @param {number|number[]|null} [size=null] - Output shape: `null` returns one sample vector, * `k` an array of `k` vectors and `[m, k]` a nested array of vectors. * @returns {number[]|number[][]|Array} Sample vector(s). * @throws {Error} If `alpha` is not in [-1, 1] or the inputs are invalid. */ export function multivariateTriangular(means: number[], covariance: number[][], alpha?: number, size?: number | number[] | null): number[] | number[][] | any[];