Skip to content
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

Untangles all of our includes! #254

Merged
merged 30 commits into from
Mar 16, 2016
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
29c62a4
Updating makefile help
syclik Mar 3, 2016
17ea996
Updating comment in fwd/mat/functor/gradient.hpp
syclik Mar 3, 2016
a2f475d
Removing prim/arr header from prim/scal
syclik Mar 3, 2016
a3fb372
Fixing prim/scal/meta/scalar_type.hpp includes and adding mat test
syclik Mar 3, 2016
2563d58
Updating tests
syclik Mar 4, 2016
a846164
Updating includes
syclik Mar 4, 2016
cb731ec
Adding more to VectorBuilder and VectorBuilderHelper; added tests
syclik Mar 4, 2016
e86e3c8
Untangling more includes
syclik Mar 4, 2016
688acac
Cleaning up includes for neg_binomial_2_cdf functions
syclik Mar 4, 2016
d04dab1
Fixing includes on coupled_ode_system
syclik Mar 5, 2016
bb5b685
Splitting apart prim/mat/err/check_ordered_test.cpp
syclik Mar 5, 2016
ddccb14
Updating integrate_ode
syclik Mar 5, 2016
7dfd17e
Splitting apart OperandsAndPartials_test
syclik Mar 5, 2016
7a3af35
Moving VectorViewMvt to prim/mat/meta
syclik Mar 7, 2016
5ab6556
Reimplementing VectorView
syclik Mar 8, 2016
270c08a
Fixing more test includes
syclik Mar 9, 2016
02d7a88
Splitting apart OperandsAndPartials
syclik Mar 10, 2016
55e70b0
Including header for is_constant_struct
syclik Mar 10, 2016
25240a1
Fixing check_nonzero_size
syclik Mar 11, 2016
5653b99
Fixing doxygen
syclik Mar 11, 2016
7a7e69d
Fixing more includes
syclik Mar 11, 2016
a0b4cea
Cpplint
syclik Mar 11, 2016
1131b6c
Included stdexcept
syclik Mar 11, 2016
52b1b6d
Squashing a compiler warning in a test
syclik Mar 11, 2016
57ab0ed
Fixed one last OperandsAndPartials thing
syclik Mar 11, 2016
55690fc
Fixing use of VectorBuilder
syclik Mar 12, 2016
9ca5021
Fixing neg_binonial_2
syclik Mar 12, 2016
d3f05ae
cpplint
syclik Mar 13, 2016
ddc580d
Moving check_nonzero_size to arr and fixing behavior to act like it d…
syclik Mar 14, 2016
7e49dc2
added to VectorView doc
Mar 16, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Untangling more includes
  • Loading branch information
syclik committed Mar 10, 2016
commit e86e3c8cadd8f81847fbc1c77775dd26bf23bec3
12 changes: 3 additions & 9 deletions stan/math/prim/scal/prob/neg_binomial_2_ccdf_log.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <stan/math/prim/scal/prob/neg_binomial_ccdf_log.hpp>
#include <stan/math/prim/scal/fun/grad_reg_inc_beta.hpp>
#include <stan/math/prim/scal/meta/VectorBuilder.hpp>
#include <vector>

namespace stan {

Expand Down Expand Up @@ -57,17 +56,12 @@ namespace stan {

size_t size_beta = max_size(mu, phi);

std::vector<typename return_type<T_location, T_precision>::type>
beta_vec(size_beta);
VectorBuilder<true, typename return_type<T_location, T_precision>::type,
T_location, T_precision> beta_vec(size_beta);
for (size_t i = 0; i < size_beta; ++i)
beta_vec[i] = phi_vec[i] / mu_vec[i];

// Cast a vector of size 1 down to a
// scalar to avoid dimension mismatch
if (size_beta == 1)
return neg_binomial_ccdf_log(n, phi, beta_vec[0]);
else
return neg_binomial_ccdf_log(n, phi, beta_vec);
return neg_binomial_ccdf_log(n, phi, beta_vec.get());
}
}
}
Expand Down