Class MonteCarloIntegration

    • Constructor Detail

      • MonteCarloIntegration

        public MonteCarloIntegration​(org.apache.commons.rng.UniformRandomProvider rng,
                                     int dimension)
        Simulation constructor.
        Parameters:
        rng - RNG.
        dimension - Integration domain dimension.
    • Method Detail

      • integrate

        public double integrate​(long n)
        Run the Monte-Carlo integration.
        Parameters:
        n - Number of random points to generate.
        Returns:
        the integral.
      • isInside

        protected abstract boolean isInside​(double... point)
        Indicates whether the given points is inside the region whose integral is computed.
        Parameters:
        point - Point whose coordinates are random numbers uniformly distributed in the unit interval.
        Returns:
        true if the point is inside.