RollDice

scalation.simulation.monte_carlo.RollDice
See theRollDice companion object
class RollDice(nDice: Int)

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
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def collect(sum: Int): Unit

Collect the result of of rolling nDice dice into the counter vector.

Collect the result of of rolling nDice dice into the counter vector.

Value parameters

sum

the sum of dice from a roll

Attributes

Return the final value of the counter vector divided by the number of rolls.

Return the final value of the counter vector divided by the number of rolls.

Attributes

def roll: Int

Roll nDice dice, returning a vector of three integers.

Roll nDice dice, returning a vector of three integers.

Attributes