scalation.simulation.monte_carlo

Members list

Type members

Classlikes

class Cards

The Cards class is used to represent a deck of playing cards.

The Cards class is used to represent a deck of playing cards.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Cards

The Cards companion object provides function that operate on cards and hands.

The Cards companion object provides function that operate on cards and hands.

Attributes

See also
Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Cards.type
class GrainDropping(stream: Int)

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

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

Supertypes
class Object
trait Matchable
class Any

The MonteCarloIntegration uses Monte Carlo sampling to approximate the integral of f(x) over the domain [a, b].

The MonteCarloIntegration uses Monte Carlo sampling to approximate the integral of f(x) over the domain [a, b].

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
class RollDice(nDice: Int)

The RollDice class is used to represent a deck of playing cards.

The RollDice class is used to represent a deck of playing cards.

Value parameters

nDice

the number of dice to roll for one sample

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object RollDice

The RollDice object provides formulas for the coefficients (number of ways) to roll a certain number.

The RollDice object provides formulas for the coefficients (number of ways) to roll a certain number.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
RollDice.type
final class cardsTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class cardsTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class cardsTest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class grainDroppingTest

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
final class montyHall

Attributes

Supertypes
class Object
trait Matchable
class Any
final class rollDiceTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class rollDiceTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class rollDiceTest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class sphereVolumeTest

Attributes

Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def cardsTest(): Unit

The cardsTest main function is used to test the Cards class.

The cardsTest main function is used to test the Cards class.

runMain scalation.simulation.monte_carlo.cardsTest

Attributes

def cardsTest2(): Unit

The cardsTest2 main function is used to test the Cards class. Classification of Poker Hands.

The cardsTest2 main function is used to test the Cards class. Classification of Poker Hands.

runMain scalation.simulation.monte_carlo.cardsTest2

Attributes

def cardsTest3(): Unit

The cardsTest3 main function is used to test the Cards class. Monte Carlo simulation to estimate probabilities of Poker Hands.

The cardsTest3 main function is used to test the Cards class. Monte Carlo simulation to estimate probabilities of Poker Hands.

runMain scalation.simulation.monte_carlo.cardsTest3

Attributes

def grainDroppingTest(): Unit

The grainDroppingTest main function is used to test the GrainDropping class.

The grainDroppingTest main function is used to test the GrainDropping class.

runMain scalation.simulation.monte_carlo.grainDroppingTest

Attributes

The MonteCarloIntegrationTest object provides a simple example of Monte Carlo Integration. This example provides a slow converging way to compute pi. The area of circle with radius one is pi.

The MonteCarloIntegrationTest object provides a simple example of Monte Carlo Integration. This example provides a slow converging way to compute pi. The area of circle with radius one is pi.

runMain scalation.simulation.monte_carlo.monteCarloIntegrationTest

Attributes

def montyHall(): Unit

The MontyHall main function is used to test whether staying or switching picks when selecting a prize behind one of three doors in "Let's Make a Deal" is the better strategy.

The MontyHall main function is used to test whether staying or switching picks when selecting a prize behind one of three doors in "Let's Make a Deal" is the better strategy.

Attributes

See also

en.wikipedia.org/wiki/Monty_Hall_problem

runMain scalation.simulation.monte_carlo.montyHall

def rollDiceTest(): Unit

The rollDiceTest main function is used to test the RollDice class.

The rollDiceTest main function is used to test the RollDice class.

runMain scalation.simulation.monte_carlo.rollDiceTest

Attributes

def rollDiceTest2(): Unit

The rollDiceTest2 main function computes the number of ways to get a sum of s using n_d = 1, 2, 3, 4 dice.

The rollDiceTest2 main function computes the number of ways to get a sum of s using n_d = 1, 2, 3, 4 dice.

runMain scalation.simulation.monte_carlo.rollDiceTest2

Attributes

def rollDiceTest3(): Unit
def sphereVolumeTest(): Unit

The sphereVolumeTest main function provides a simple example of Monte Carlo estimation of the volume of a unit sphere.

The sphereVolumeTest main function provides a simple example of Monte Carlo estimation of the volume of a unit sphere.

runMain scalation.simulation.monte_carlo.sphereVolumeTest

Attributes