Class: Dicey::SumFrequencyCalculators::Empirical

Inherits:
BaseCalculator show all
Includes:
Mixins::VectorizeDice
Defined in:
lib/dicey/sum_frequency_calculators/empirical.rb

Overview

Note:

This calculator is mostly a joke. It can be useful for educational purposes, or to verify results of BruteForce when in doubt. It is not used by default.

“Calculator” for a collection of AbstractDie using empirically-obtained statistics.

Does a number of rolls and calculates approximate probabilities from that. Even if frequencies are requested, results are non-integer.

If dice include non-numeric sides, gem vector_number has to be installed.

Options:

  • rolls (Integer) (defaults to: N) — number of rolls to perform

Constant Summary collapse

N =

Default number of rolls to perform.

10_000

Constants inherited from BaseCalculator

BaseCalculator::RESULT_TYPES

Method Summary

Methods inherited from BaseCalculator

#call, #heuristic_complexity, #valid_for?