Class AbstractMultivariateRealDistribution

    • Field Detail

      • random

        protected final RandomGenerator random
        RNG instance used to generate samples from the distribution.
    • Constructor Detail

      • AbstractMultivariateRealDistribution

        protected AbstractMultivariateRealDistribution​(RandomGenerator rng,
                                                       int n)
        Simple constructor.
        Parameters:
        rng - Random number generator.
        n - Number of dimensions.
    • Method Detail

      • reseedRandomGenerator

        public void reseedRandomGenerator​(long seed)
        Reseeds the random generator used to generate samples.
        Specified by:
        reseedRandomGenerator in interface MultivariateRealDistribution
        Parameters:
        seed - Seed with which to initialize the random number generator.
      • getDimension

        public int getDimension()
        Gets the number of random variables of the distribution. It is the size of the array returned by the sample method.
        Specified by:
        getDimension in interface MultivariateRealDistribution
        Returns:
        the number of variables.
      • sample

        public abstract double[] sample()
        Generates a random value vector sampled from this distribution.
        Specified by:
        sample in interface MultivariateRealDistribution
        Returns:
        a random value vector.