Coding

Contents:

Guide lines

Some basic rules:

  1. Tests are in their own directory tree that is equals to the real tree. Never put tests in here! That’s why we have a folder for them :)
  2. Objects with same interface should inheritance from the same interface.

Q: Where do i put a new object?

A: Each object should be placed in his own file.

Q: Do you have any global files?

A: No. This project doesn’t seem to need one right now.

Inheritances

All object inheritance the bases class.

Base classes

class base.probability.Probability(probability: float, not_probability=None)[source]
class base.probability_distribution.ProbabilityDistribution[source]
Variables:
  • fullbase.probabilities.Probability The probabilities 1 of this distribution.
  • fullbase.probabilities.Probability The probabilities 0 of this distribution.
expected_value[source]

The expected value of the distribution.

Returns:The expected value of the distribution.
Return type:float
median[source]

The median of the distribution.

Returns:Median of the distribution.
Return type:float
mode[source]

The mode of the distribution.

Returns:Mode of the distribution.
Return type:float
standard_deviation[source]

The standard deviation of the distribution.

Returns:Standard deviation of the distribution.
Return type:float
variance[source]

The variance of the distribution.

Returns:Variance of the distribution.
Return type:float

Probabilities are separated to two - discrete probability and -TODO: completed the anther one-. For them we made other base classes: