Skip to content

Commit

Permalink
Update binomial probability computation
Browse files Browse the repository at this point in the history
  • Loading branch information
pfernique committed Sep 1, 2016
1 parent c6564be commit ca8e730
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion doc/cfg.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
c.NbConvertApp.notebooks = ["examples/basic.ipynb"]
c.NbConvertApp.notebooks = ["examples/basic.ipynb",
"examples/subset.ipynb"]

c.ExecutePreprocessor.timeout = 60

# conda install python-autowig python-clanglite -c statiskit -c conda-forge && git clone https://github.com/StatisKit/AutoWIG.git && cd AutoWIG/doc && jupyter nbconvert --config cfg.py --to notebook --execute --inplace
2 changes: 1 addition & 1 deletion doc/examples/basic/src/cpp/binomial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ double BinomialDistribution::pmf(const unsigned int value) const
if(value > n)
{ p = 0; }
else
{ p = factorial(n)/(factorial(n-value) * factorial(value)) * pow(1-p, n-value) * pow(p, value); }
{ p = factorial(n)/(factorial(n-value) * factorial(value)) * pow(1-_pi, n-value) * pow(_pi, value); }
return p;
}

Expand Down

0 comments on commit ca8e730

Please sign in to comment.