Skip to content

Commit f822a16

Browse files
committed
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
1 parent aa576fd commit f822a16

7 files changed

Lines changed: 19 additions & 23 deletions

File tree

stan/math/prim/prob/geometric_cdf.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ namespace math {
3434
* @throw std::invalid_argument if container sizes mismatch
3535
*/
3636
template <typename T_n, typename T_prob>
37-
inline return_type_t<T_prob> geometric_cdf(const T_n& n,
38-
const T_prob& theta) {
37+
inline return_type_t<T_prob> geometric_cdf(const T_n& n, const T_prob& theta) {
3938
using T_partials_return = partials_return_t<T_n, T_prob>;
4039
using T_n_ref = ref_type_t<T_n>;
4140
using T_prob_ref = ref_type_t<T_prob>;
@@ -49,8 +48,8 @@ inline return_type_t<T_prob> geometric_cdf(const T_n& n,
4948

5049
T_n_ref n_ref = n;
5150
T_prob_ref theta_ref = theta;
52-
check_bounded(function, "Success probability parameter",
53-
value_of(theta_ref), 0.0, 1.0);
51+
check_bounded(function, "Success probability parameter", value_of(theta_ref),
52+
0.0, 1.0);
5453

5554
scalar_seq_view<T_n_ref> n_vec(n_ref);
5655
scalar_seq_view<T_prob_ref> theta_vec(theta_ref);

stan/math/prim/prob/geometric_lccdf.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ inline return_type_t<T_prob> geometric_lccdf(const T_n& n,
4747

4848
T_n_ref n_ref = n;
4949
T_prob_ref theta_ref = theta;
50-
check_bounded(function, "Success probability parameter",
51-
value_of(theta_ref), 0.0, 1.0);
50+
check_bounded(function, "Success probability parameter", value_of(theta_ref),
51+
0.0, 1.0);
5252

5353
scalar_seq_view<T_n_ref> n_vec(n_ref);
5454
scalar_seq_view<T_prob_ref> theta_vec(theta_ref);

stan/math/prim/prob/geometric_lcdf.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ namespace math {
3434
* @throw std::invalid_argument if container sizes mismatch
3535
*/
3636
template <typename T_n, typename T_prob>
37-
inline return_type_t<T_prob> geometric_lcdf(const T_n& n,
38-
const T_prob& theta) {
37+
inline return_type_t<T_prob> geometric_lcdf(const T_n& n, const T_prob& theta) {
3938
using T_partials_return = partials_return_t<T_n, T_prob>;
4039
using T_n_ref = ref_type_t<T_n>;
4140
using T_prob_ref = ref_type_t<T_prob>;
@@ -49,8 +48,8 @@ inline return_type_t<T_prob> geometric_lcdf(const T_n& n,
4948

5049
T_n_ref n_ref = n;
5150
T_prob_ref theta_ref = theta;
52-
check_bounded(function, "Success probability parameter",
53-
value_of(theta_ref), 0.0, 1.0);
51+
check_bounded(function, "Success probability parameter", value_of(theta_ref),
52+
0.0, 1.0);
5453

5554
scalar_seq_view<T_n_ref> n_vec(n_ref);
5655
scalar_seq_view<T_prob_ref> theta_vec(theta_ref);

stan/math/prim/prob/geometric_lpmf.hpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ namespace math {
4444
template <bool propto, typename T_n, typename T_prob,
4545
require_all_not_nonscalar_prim_or_rev_kernel_expression_t<
4646
T_n, T_prob>* = nullptr>
47-
inline return_type_t<T_prob> geometric_lpmf(const T_n& n,
48-
const T_prob& theta) {
47+
inline return_type_t<T_prob> geometric_lpmf(const T_n& n, const T_prob& theta) {
4948
using std::log;
5049
using T_partials_return = partials_return_t<T_n, T_prob>;
5150
using T_n_ref = ref_type_t<T_n>;
@@ -60,8 +59,8 @@ inline return_type_t<T_prob> geometric_lpmf(const T_n& n,
6059
T_n_ref n_ref = n;
6160
T_prob_ref theta_ref = theta;
6261
check_nonnegative(function, "Outcome variable", n_ref);
63-
check_bounded(function, "Success probability parameter",
64-
value_of(theta_ref), 0.0, 1.0);
62+
check_bounded(function, "Success probability parameter", value_of(theta_ref),
63+
0.0, 1.0);
6564

6665
if constexpr (!include_summand<propto, T_prob>::value) {
6766
return 0.0;
@@ -103,8 +102,7 @@ inline return_type_t<T_prob> geometric_lpmf(const T_n& n,
103102
}
104103

105104
template <typename T_n, typename T_prob>
106-
inline return_type_t<T_prob> geometric_lpmf(const T_n& n,
107-
const T_prob& theta) {
105+
inline return_type_t<T_prob> geometric_lpmf(const T_n& n, const T_prob& theta) {
108106
return geometric_lpmf<false>(n, theta);
109107
}
110108

stan/math/prim/prob/geometric_rng.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ inline auto geometric_rng(T_prob&& theta, RNG& rng) {
6363
result[i] = 0;
6464
} else {
6565
double u_i = uniform(rng);
66-
result[i] = static_cast<int>(
67-
std::floor(std::log(u_i) / log1m(theta_arr[i])));
66+
result[i]
67+
= static_cast<int>(std::floor(std::log(u_i) / log1m(theta_arr[i])));
6868
}
6969
}
7070
return result;

test/prob/geometric/geometric_cdf_test.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ class AgradCdfGeometric : public AgradCdfTest {
5959
template <class T_n, class T_prob, typename T2, typename T3, typename T4,
6060
typename T5>
6161
stan::return_type_t<T_n, T_prob> cdf_function(const T_n& n,
62-
const T_prob& theta,
63-
const T2&, const T3&,
64-
const T4&, const T5&) {
62+
const T_prob& theta, const T2&,
63+
const T3&, const T4&,
64+
const T5&) {
6565
using stan::math::log1m;
6666
return 1.0 - stan::math::exp((n + 1.0) * log1m(theta));
6767
}

test/unit/math/prim/prob/geometric_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class GeometricTestRig : public VectorIntRNGTestRig {
1111
public:
1212
GeometricTestRig()
1313
: VectorIntRNGTestRig(10000, 10, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
14-
{0.1, 0.3, 0.5, 0.7, 0.9}, {1},
15-
{-0.1, 1.1}, {-1, 0, 2}) {}
14+
{0.1, 0.3, 0.5, 0.7, 0.9}, {1}, {-0.1, 1.1},
15+
{-1, 0, 2}) {}
1616

1717
template <typename T1, typename T2, typename T3, typename T_rng>
1818
auto generate_samples(const T1& theta, const T2&, const T3&,

0 commit comments

Comments
 (0)