New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/2467 Vectorize Discrete RNGs and a few others #2580

Merged
merged 3 commits into from Jul 11, 2018

Conversation

Projects
None yet
4 participants
@roualdes
Contributor

roualdes commented Jul 10, 2018

Submission Checklist

  • Run unit tests: ./runTests.py src/test/unit
  • Run cpplint: make cpplint
  • Declare copyright holder and open-source license: see below

Tests passed: make clean && ./runTests.py -j3 src/test/unit/lang

Summary

Expose (most) discrete and a few straggling continuous RNGs following PR stan-dev/math#833 in a continued effort to fulfill #2467.

Intended Effect

Specifically, expose the following RNGs

multi_normal_rng
multi_normal_cholesky_rng
multi_student_t_rng
bernoulli_rng
beta_binomial_rng
binomial_rng
neg_binomial_2_rng
neg_binomial_2_log_rng
neg_binomial_rng
poisson_rng
poisson_log_rng
uniform_rng
von_mises_rng

How to Verify

Tests in src/test/test-models/good/function-signatures/distributions/rngs.stan

Side Effects

None intended.

Documentation

In src/docs/stan-reference/distributions.tex

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):

California State University, Chico

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

expose vectorized RNGs for discrete distributions and a few stragglin…
…g continuous distributions, matching stan-dev/math PR #833
@bob-carpenter

This comment has been minimized.

Contributor

bob-carpenter commented Jul 11, 2018

@roualdes There's a conflict here that needs to get resolved. I updated all the doc from under your issue for the 2.18 release. The merge conflict should be minor as not that much changed in the functions doc.

@bob-carpenter

Looks great. Let me know when you fix the merge conflict and I'll merge into develop.

@@ -110,7 +112,13 @@ for (size_t i = 0; i < int_vector_types.size(); i++)
int_vector_types[i], int_vector_types[j],
vector_types[k], vector_types[l]);
}
add("beta_binomial_rng", expr_type(int_type()), expr_type(int_type()), expr_type(double_type()), expr_type(double_type()));
for (const auto& t : int_vector_types) {

This comment has been minimized.

@bob-carpenter

bob-carpenter Jul 11, 2018

Contributor

Nice! We really need to bring the rest of our code up to C++11 standards.

roualdes added some commits Jul 11, 2018

Merge remote-tracking branch 'upstream/develop' into develop
Attempting to get stan-dev/stan.git into my fork.
@roualdes

This comment has been minimized.

Contributor

roualdes commented Jul 11, 2018

Just attempted some git fu. Hoping for the best. Thanks for the quick review.

@roualdes

This comment has been minimized.

Contributor

roualdes commented Jul 11, 2018

Looks like one of the jobs timed out.

@bbbales2

This comment has been minimized.

Member

bbbales2 commented Jul 11, 2018

@roualdes I just restarted it but that's probably not gonna help anything. @seantalts ideas?

@seantalts

This comment has been minimized.

Member

seantalts commented Jul 11, 2018

Travis timeouts usually are fixed by just restarting that particular job. Fingers crossed!

@seantalts seantalts merged commit 2a3f740 into stan-dev:develop Jul 11, 2018

2 checks passed

continuous-integration/jenkins/pr-merge This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@roualdes roualdes deleted the roualdes:feature/issue-2467-vectorized-discrete-rngs branch Jul 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment