Commit Graph

5028 Commits

Author SHA1 Message Date
jzmaddock
b471723bd1 Fix bug cases reported by Rocco Romeo:
* Add another approximation for x very small.
* Add code to handle cases where tgamma(a) would overflow.
* Add tests for the above.
2014-09-14 17:05:15 +01:00
jzmaddock
d1d6d5b063 Fix derivative of incomplete beta in special cases where a = b = 0.5 and b = 1.
Add additional tests to non-central F and T distributions to verify above fix.
Fixes https://svn.boost.org/trac/boost/ticket/10480.
2014-09-12 16:29:29 +01:00
jzmaddock
4909e5c02f Merge branch 'feature/hyperexponential_dist' of https://github.com/sguazt/math into develop 2014-09-09 17:44:21 +01:00
sguazt
1df97b244e [distributions] Hyper-Exponential: fixed another typo. 2014-09-09 18:43:31 +02:00
sguazt
f209b93ba8 [distributions] Hyper-Exponential: fixed a copy-and-paste typo in the doc. 2014-09-09 18:28:17 +02:00
jzmaddock
321d8f2eda Merge branch 'hyper_exponential' into develop 2014-09-08 18:12:52 +01:00
jzmaddock
17e4f40fce Revert "[distributions] Hyper-Exponential: changed return type of 'probabilities' and 'rates' from 'vector<...>' to 'vector<...> const\&' to allow users to do things like this: 'std::copy(he.probabilities().begin(), he.probabilities().end(), std::ostream_iterator<double>(std::cout, " "));'."
This reverts commit a8efc9a637.
2014-09-08 18:10:53 +01:00
jzmaddock
90001d9c06 Doc rebuild. 2014-09-08 18:09:50 +01:00
jzmaddock
5d37faf873 Merge branch 'feature/hyperexponential_dist' of https://github.com/sguazt/math into hyper_exponential 2014-09-08 17:14:23 +01:00
sguazt
2ded2d0822 [distributions] Hyper-Exponential: added two more graphs (one with different probs and same rates, and another one with different number of phases but same mean). 2014-09-07 18:42:25 +02:00
sguazt
0396d72311 [distributions] Hyper-Exponential: added two more graphs (one with different probs and same rates, and another one with different number of phases but same mean). 2014-09-07 18:41:56 +02:00
sguazt
cbbab041aa [distributions] Hyper-Exponential: output of Wolski's example changed to a floating-point precision of 2 (obtained with 'std::cout.precision(2)'). 2014-09-07 11:29:31 +02:00
sguazt
72a2217b6d [distributions] Hyper-Exponential: added a note to clarify that the probabilities return by method 'probabilities' are normalized. 2014-09-07 10:46:05 +02:00
sguazt
a8efc9a637 [distributions] Hyper-Exponential: changed return type of 'probabilities' and 'rates' from 'vector<...>' to 'vector<...> const\&' to allow users to do things like this: 'std::copy(he.probabilities().begin(), he.probabilities().end(), std::ostream_iterator<double>(std::cout, " "));'. 2014-09-07 10:29:09 +02:00
jzmaddock
f73ecae7f5 Add some tests for the error handlers. 2014-09-05 18:56:49 +01:00
sguazt
e4d290b501 [distributions] Hyper-Exponential: added test for special cases (i.e., the one discussed under the 'Related distributions' section of the doc). 2014-09-04 16:07:50 +02:00
jzmaddock
bc77596f23 Improve calculation of phase probabilities when normalizing so they really should add up to 1.
Allow slight tolerance in checking for sum of phase probabilities.
Add missing call to normalize in iterator constructor.
Remove asserts that duplicated the error handling code - better to provide consistent behavior via the error handlers.
Add comment to examples about other containers working equally well.
2014-09-03 19:25:20 +01:00
sguazt
0e37387689 [distributions] Hyper-Exponential: removed discussion on accuracy issues in MATLAB/Octave since the two programs gives correct results (during the test I wrongly passed rates instead of means to the exponential distributions). 2014-09-02 22:31:08 +02:00
jzmaddock
671cd12ee4 Regen docs from Marco's changes. 2014-09-02 18:26:16 +01:00
sguazt
e22fc7d1d1 [distributions] Hyper-Exponential: solved an issue with Quickbook's itemized lists. 2014-09-02 10:23:15 +02:00
sguazt
78560da5a0 [distributions] Hyper-Exponential: added a note for the different results between (Wolski et al.,2013) and ours implementation. Also, improved discussion on possible accuracy issues with MATLAB/Octave. 2014-09-02 09:55:29 +02:00
sguazt
3c596733f8 [distributions] Hyper-Exponential: added example and doc from (Wolski et al.,2013) paper. 2014-09-01 23:49:32 +02:00
sguazt
99854c724f [distributions] Hyper-Exponential: removed 'ArgT' type requirements for constructors taking 'std::initializer_list' as argument since no more used. Also fixed a typo: 'RealTypr' -> 'RealType'. 2014-09-01 21:31:39 +02:00
sguazt
43de825473 [distributions] Hyper-Exponential: BOOST_MSVC -> _MSC_VER (as _MSC_VER is always defined for MS VS, whereas BOOST_MSVC isn’t defined until *after* the first call to boost/config.hpp). Also, added MSVC pragma 4389. 2014-09-01 21:25:11 +02:00
jzmaddock
553ee67631 Change the header levels. 2014-09-01 19:47:51 +01:00
jzmaddock
f8e0a5524d Move code snippets into separate cpp file. 2014-09-01 19:18:12 +01:00
jzmaddock
4a6cbc1135 Initializer-list constructors don't need to be templates - indeed it is better if they're not. 2014-09-01 18:14:35 +01:00
jzmaddock
4cf89d8d03 Remove implementation details from docs.
Add some construction examples.
2014-09-01 17:48:55 +01:00
jzmaddock
aba44eb4a5 Doc update 2014-09-01 12:15:43 +01:00
sguazt
f5cec49a60 [distributions] Hyper-Exponential: added include of 'iterator' for 'std::distance' and aesthetic changes. 2014-09-01 09:50:16 +02:00
sguazt
13f360d0be [distributions] Hyper-exponential: expanded 'Applications' section, added 'Examples' section, and updated synopsys and reference with new constructors. 2014-08-31 23:24:08 +02:00
sguazt
34e42a36c5 [distributions] Hyper-Exponential: added include file for macro BOOST_NO_CXX11_HDR_INITIALIZER_LIST and removed 'const\&' from 'std::initializer_list' (as from (Stroustrup,TCPL4e). 2014-08-31 23:22:15 +02:00
sguazt
4d36418246 Merge branch 'hyper_exponential' into feature/hyperexponential_dist 2014-08-30 21:31:54 +02:00
jzmaddock
60a6730fe2 Modify Marco's 1 and 2 arg constructors to use SFINAE to differentiate between iterators and ranges.
Add a 1 arg initializer list constructor.
Update tests accordingly.
2014-08-30 17:03:26 +01:00
sguazt
8bb98342ab Merge branch 'hyper_exponential' into feature/hyperexponential_dist 2014-08-30 08:20:15 +02:00
jzmaddock
cc853b9b4b Merge branch 'feature/hyperexponential_dist' of https://github.com/sguazt/math into hyper_exponential 2014-08-29 18:56:44 +01:00
jzmaddock
9cdbebb629 Regenerate SVG and PNG files to our spec. 2014-08-29 18:50:51 +01:00
sguazt
62ee849eab [distributions] Hyper-Exponential: added more constructors and class construction test case. 2014-08-28 10:12:41 +02:00
jzmaddock
41a20980fa Update docs. 2014-08-26 19:04:18 +01:00
jzmaddock
08308ab945 Merge branch 'feature/hyperexponential_dist' of https://github.com/sguazt/math into hyper_exponential 2014-08-26 18:57:25 +01:00
sguazt
fa198a0b04 [distributions] Hyper-Exponential: clean-up. 2014-08-26 17:08:05 +02:00
sguazt
a8ac5aab96 [distributions] Hyper-Exponential: finalized doc. 2014-08-26 17:07:24 +02:00
jzmaddock
2e7eede435 Add comment linking to discussion. 2014-08-25 17:04:52 +01:00
jzmaddock
1d37f8ad9d Add extended tests for difficult cases from https://github.com/boostorg/math/pull/8 2014-08-25 17:02:21 +01:00
jzmaddock
d8c97bec27 Add initializer_list support and tests. 2014-08-25 13:11:51 +01:00
jzmaddock
2915adc0f8 Fix tolerance, add a missing L suffix on test data. 2014-08-25 10:26:37 +01:00
sguazt
c33e0ee2e2 [distributions] Hyper-Exponential: fixed test results according to Mathematica output when instead of decimal numbers we use fractions. 2014-08-25 10:53:27 +02:00
sguazt
c693510588 [distributions] Hyper-Exponential: use exponential's PDF in hyperexponential PDF. 2014-08-25 10:45:08 +02:00
sguazt
4044b0dd2d Merged from branch 'hyper_exponential'. 2014-08-25 10:38:57 +02:00
sguazt
5f61ec432d [distributions] Hyper-Exponential: fixed test results according to Mathematica test output where in place of decimal numbers we use the corresponding fractions. 2014-08-25 10:07:08 +02:00