GrainDropping

scalation.simulation.monte_carlo.GrainDropping
class GrainDropping(stream: Int)

The GrainDropping class may be used for rough estimates of pi by using Monte Carlo Simulation.

Value parameters

stream

the random number stream to use

Attributes

See also

also Buffon Needle Experiment

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def fraction(n: Int): Double

Return the fraction of grains found inside the unit circle.

Return the fraction of grains found inside the unit circle.

Value parameters

n

the number of grains to generate

Attributes