Coding¶
Contents:
Guide lines¶
Some basic rules:
- 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 :)
- 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_distribution.ProbabilityDistribution[source]¶
Variables: - full – base.probabilities.Probability The probabilities 1 of this distribution.
- full – base.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
Probabilities are separated to two - discrete probability and -TODO: completed the anther one-. For them we made other base classes:
- discrete_probability.base.probability.DiscreteProbability and discrete_probability.base.probability_distribution.DiscreteProbabilityDistribution.
- TODO: completed the anther one-