Skip to content

Conversation

jszuppe
Copy link
Contributor

@jszuppe jszuppe commented May 10, 2016

Resolves #612. I've also added min() and max() methods and changed boost::compute::discrete_distribution so now it generates IntType values instead of always generating uint values.

@coveralls
Copy link

coveralls commented May 10, 2016

Coverage Status

Coverage increased (+0.07%) to 88.874% when pulling 02b444d on haahh:pr_discrete_distribution into d172c80 on boostorg:develop.


/// Generates uniformily distributed integers and stores
/// Returns the minimum potentially generated value.
result_type BOOST_PREVENT_MACRO_SUBSTITUTION min() const
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the BOOST_PREVENT_MACRO_SUBSTITUTION macro needs to go between the function name and the parentheses. Something like:

result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Fixed!

jszuppe added 5 commits May 11, 2016 08:30
Add support for the case with first iterator being equal
to last iterator in range ctor. Now it behaves like ctor in
std::discrete_distribution.
Additionaly: now method probabilities() returns correct vector
of probabilities.
Class discrete_distribution should generate values of type
IntType. Until now it always generated unsigned int values.
@jszuppe jszuppe force-pushed the pr_discrete_distribution branch from 02b444d to 56ad192 Compare May 11, 2016 06:32
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 56ad192 on haahh:pr_discrete_distribution into * on boostorg:develop*.

@kylelutz kylelutz merged commit d41ff00 into boostorg:develop May 13, 2016
@kylelutz
Copy link
Collaborator

Looks good, merged!

@jszuppe jszuppe deleted the pr_discrete_distribution branch May 31, 2016 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants