forked from stan-dev/math
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfun.hpp
333 lines (331 loc) · 14.8 KB
/
fun.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
#ifndef STAN_MATH_PRIM_FUN_HPP
#define STAN_MATH_PRIM_FUN_HPP
#include <stan/math/prim/fun/abs.hpp>
#include <stan/math/prim/fun/accumulator.hpp>
#include <stan/math/prim/fun/acos.hpp>
#include <stan/math/prim/fun/acosh.hpp>
#include <stan/math/prim/fun/add.hpp>
#include <stan/math/prim/fun/add_diag.hpp>
#include <stan/math/prim/fun/append_array.hpp>
#include <stan/math/prim/fun/append_col.hpp>
#include <stan/math/prim/fun/append_row.hpp>
#include <stan/math/prim/fun/arg.hpp>
#include <stan/math/prim/fun/array_builder.hpp>
#include <stan/math/prim/fun/as_bool.hpp>
#include <stan/math/prim/fun/asin.hpp>
#include <stan/math/prim/fun/asinh.hpp>
#include <stan/math/prim/fun/assign.hpp>
#include <stan/math/prim/fun/atan.hpp>
#include <stan/math/prim/fun/atanh.hpp>
#include <stan/math/prim/fun/autocorrelation.hpp>
#include <stan/math/prim/fun/autocovariance.hpp>
#include <stan/math/prim/fun/bessel_first_kind.hpp>
#include <stan/math/prim/fun/bessel_second_kind.hpp>
#include <stan/math/prim/fun/beta.hpp>
#include <stan/math/prim/fun/binary_log_loss.hpp>
#include <stan/math/prim/fun/binomial_coefficient_log.hpp>
#include <stan/math/prim/fun/block.hpp>
#include <stan/math/prim/fun/boost_policy.hpp>
#include <stan/math/prim/fun/cbrt.hpp>
#include <stan/math/prim/fun/ceil.hpp>
#include <stan/math/prim/fun/chol2inv.hpp>
#include <stan/math/prim/fun/cholesky_corr_constrain.hpp>
#include <stan/math/prim/fun/cholesky_corr_free.hpp>
#include <stan/math/prim/fun/cholesky_decompose.hpp>
#include <stan/math/prim/fun/cholesky_factor_constrain.hpp>
#include <stan/math/prim/fun/cholesky_factor_free.hpp>
#include <stan/math/prim/fun/choose.hpp>
#include <stan/math/prim/fun/col.hpp>
#include <stan/math/prim/fun/cols.hpp>
#include <stan/math/prim/fun/columns_dot_product.hpp>
#include <stan/math/prim/fun/columns_dot_self.hpp>
#include <stan/math/prim/fun/conj.hpp>
#include <stan/math/prim/fun/constants.hpp>
#include <stan/math/prim/fun/conv_gaus_line.hpp>
#include <stan/math/prim/fun/copysign.hpp>
#include <stan/math/prim/fun/corr_constrain.hpp>
#include <stan/math/prim/fun/corr_free.hpp>
#include <stan/math/prim/fun/corr_matrix_constrain.hpp>
#include <stan/math/prim/fun/corr_matrix_free.hpp>
#include <stan/math/prim/fun/cos.hpp>
#include <stan/math/prim/fun/cosh.hpp>
#include <stan/math/prim/fun/cov_exp_quad.hpp>
#include <stan/math/prim/fun/cov_matrix_constrain.hpp>
#include <stan/math/prim/fun/cov_matrix_constrain_lkj.hpp>
#include <stan/math/prim/fun/cov_matrix_free.hpp>
#include <stan/math/prim/fun/cov_matrix_free_lkj.hpp>
#include <stan/math/prim/fun/crossprod.hpp>
#include <stan/math/prim/fun/csr_extract_u.hpp>
#include <stan/math/prim/fun/csr_extract_v.hpp>
#include <stan/math/prim/fun/csr_extract_w.hpp>
#include <stan/math/prim/fun/csr_matrix_times_vector.hpp>
#include <stan/math/prim/fun/csr_to_dense_matrix.hpp>
#include <stan/math/prim/fun/csr_u_to_z.hpp>
#include <stan/math/prim/fun/cumulative_sum.hpp>
#include <stan/math/prim/fun/determinant.hpp>
#include <stan/math/prim/fun/diag_matrix.hpp>
#include <stan/math/prim/fun/diag_post_multiply.hpp>
#include <stan/math/prim/fun/diag_pre_multiply.hpp>
#include <stan/math/prim/fun/diagonal.hpp>
#include <stan/math/prim/fun/digamma.hpp>
#include <stan/math/prim/fun/dims.hpp>
#include <stan/math/prim/fun/distance.hpp>
#include <stan/math/prim/fun/divide.hpp>
#include <stan/math/prim/fun/dot.hpp>
#include <stan/math/prim/fun/dot_product.hpp>
#include <stan/math/prim/fun/dot_self.hpp>
#include <stan/math/prim/fun/eigenvalues_sym.hpp>
#include <stan/math/prim/fun/eigenvectors_sym.hpp>
#include <stan/math/prim/fun/elt_divide.hpp>
#include <stan/math/prim/fun/elt_multiply.hpp>
#include <stan/math/prim/fun/erf.hpp>
#include <stan/math/prim/fun/erfc.hpp>
#include <stan/math/prim/fun/exp.hpp>
#include <stan/math/prim/fun/exp2.hpp>
#include <stan/math/prim/fun/expm1.hpp>
#include <stan/math/prim/fun/F32.hpp>
#include <stan/math/prim/fun/fabs.hpp>
#include <stan/math/prim/fun/factor_U.hpp>
#include <stan/math/prim/fun/factor_cov_matrix.hpp>
#include <stan/math/prim/fun/falling_factorial.hpp>
#include <stan/math/prim/fun/fdim.hpp>
#include <stan/math/prim/fun/fill.hpp>
#include <stan/math/prim/fun/finite_diff_stepsize.hpp>
#include <stan/math/prim/fun/floor.hpp>
#include <stan/math/prim/fun/fma.hpp>
#include <stan/math/prim/fun/fmax.hpp>
#include <stan/math/prim/fun/fmin.hpp>
#include <stan/math/prim/fun/gamma_p.hpp>
#include <stan/math/prim/fun/gamma_q.hpp>
#include <stan/math/prim/fun/gaus_interp.hpp>
#include <stan/math/prim/fun/get.hpp>
#include <stan/math/prim/fun/get_base1.hpp>
#include <stan/math/prim/fun/get_base1_lhs.hpp>
#include <stan/math/prim/fun/get_lp.hpp>
#include <stan/math/prim/fun/gp_dot_prod_cov.hpp>
#include <stan/math/prim/fun/gp_exponential_cov.hpp>
#include <stan/math/prim/fun/gp_matern32_cov.hpp>
#include <stan/math/prim/fun/gp_matern52_cov.hpp>
#include <stan/math/prim/fun/gp_periodic_cov.hpp>
#include <stan/math/prim/fun/grad_2F1.hpp>
#include <stan/math/prim/fun/grad_F32.hpp>
#include <stan/math/prim/fun/grad_inc_beta.hpp>
#include <stan/math/prim/fun/grad_reg_inc_beta.hpp>
#include <stan/math/prim/fun/grad_reg_inc_gamma.hpp>
#include <stan/math/prim/fun/grad_reg_lower_inc_gamma.hpp>
#include <stan/math/prim/fun/head.hpp>
#include <stan/math/prim/fun/hypot.hpp>
#include <stan/math/prim/fun/identity_constrain.hpp>
#include <stan/math/prim/fun/identity_free.hpp>
#include <stan/math/prim/fun/identity_matrix.hpp>
#include <stan/math/prim/fun/i_times.hpp>
#include <stan/math/prim/fun/if_else.hpp>
#include <stan/math/prim/fun/imag.hpp>
#include <stan/math/prim/fun/inc_beta.hpp>
#include <stan/math/prim/fun/initialize.hpp>
#include <stan/math/prim/fun/int_step.hpp>
#include <stan/math/prim/fun/inv.hpp>
#include <stan/math/prim/fun/inv_Phi.hpp>
#include <stan/math/prim/fun/inv_cloglog.hpp>
#include <stan/math/prim/fun/inv_logit.hpp>
#include <stan/math/prim/fun/inv_sqrt.hpp>
#include <stan/math/prim/fun/inv_square.hpp>
#include <stan/math/prim/fun/inverse.hpp>
#include <stan/math/prim/fun/inverse_softmax.hpp>
#include <stan/math/prim/fun/inverse_spd.hpp>
#include <stan/math/prim/fun/isfinite.hpp>
#include <stan/math/prim/fun/isinf.hpp>
#include <stan/math/prim/fun/isnan.hpp>
#include <stan/math/prim/fun/isnormal.hpp>
#include <stan/math/prim/fun/is_any_nan.hpp>
#include <stan/math/prim/fun/is_inf.hpp>
#include <stan/math/prim/fun/is_nan.hpp>
#include <stan/math/prim/fun/is_uninitialized.hpp>
#include <stan/math/prim/fun/lb_constrain.hpp>
#include <stan/math/prim/fun/lb_free.hpp>
#include <stan/math/prim/fun/lbeta.hpp>
#include <stan/math/prim/fun/ldexp.hpp>
#include <stan/math/prim/fun/LDLT_factor.hpp>
#include <stan/math/prim/fun/lgamma.hpp>
#include <stan/math/prim/fun/linspaced_array.hpp>
#include <stan/math/prim/fun/linspaced_row_vector.hpp>
#include <stan/math/prim/fun/linspaced_vector.hpp>
#include <stan/math/prim/fun/lmgamma.hpp>
#include <stan/math/prim/fun/log.hpp>
#include <stan/math/prim/fun/logb.hpp>
#include <stan/math/prim/fun/log10.hpp>
#include <stan/math/prim/fun/log1m.hpp>
#include <stan/math/prim/fun/log1m_exp.hpp>
#include <stan/math/prim/fun/log1m_inv_logit.hpp>
#include <stan/math/prim/fun/log1p.hpp>
#include <stan/math/prim/fun/log1p_exp.hpp>
#include <stan/math/prim/fun/log2.hpp>
#include <stan/math/prim/fun/log_determinant.hpp>
#include <stan/math/prim/fun/log_determinant_ldlt.hpp>
#include <stan/math/prim/fun/log_determinant_spd.hpp>
#include <stan/math/prim/fun/log_diff_exp.hpp>
#include <stan/math/prim/fun/log_falling_factorial.hpp>
#include <stan/math/prim/fun/log_inv_logit.hpp>
#include <stan/math/prim/fun/log_inv_logit_diff.hpp>
#include <stan/math/prim/fun/log_mix.hpp>
#include <stan/math/prim/fun/log_modified_bessel_first_kind.hpp>
#include <stan/math/prim/fun/log_rising_factorial.hpp>
#include <stan/math/prim/fun/log_softmax.hpp>
#include <stan/math/prim/fun/log_sum_exp.hpp>
#include <stan/math/prim/fun/logical_and.hpp>
#include <stan/math/prim/fun/logical_eq.hpp>
#include <stan/math/prim/fun/logical_gt.hpp>
#include <stan/math/prim/fun/logical_gte.hpp>
#include <stan/math/prim/fun/logical_lt.hpp>
#include <stan/math/prim/fun/logical_lte.hpp>
#include <stan/math/prim/fun/logical_negation.hpp>
#include <stan/math/prim/fun/logical_neq.hpp>
#include <stan/math/prim/fun/logical_or.hpp>
#include <stan/math/prim/fun/logit.hpp>
#include <stan/math/prim/fun/lub_constrain.hpp>
#include <stan/math/prim/fun/lub_free.hpp>
#include <stan/math/prim/fun/make_nu.hpp>
#include <stan/math/prim/fun/matrix_exp.hpp>
#include <stan/math/prim/fun/matrix_exp_multiply.hpp>
#include <stan/math/prim/fun/matrix_power.hpp>
#include <stan/math/prim/fun/max.hpp>
#include <stan/math/prim/fun/max_size.hpp>
#include <stan/math/prim/fun/max_size_mvt.hpp>
#include <stan/math/prim/fun/mdivide_left.hpp>
#include <stan/math/prim/fun/mdivide_left_ldlt.hpp>
#include <stan/math/prim/fun/mdivide_left_spd.hpp>
#include <stan/math/prim/fun/mdivide_left_tri.hpp>
#include <stan/math/prim/fun/mdivide_left_tri_low.hpp>
#include <stan/math/prim/fun/mdivide_right.hpp>
#include <stan/math/prim/fun/mdivide_right_ldlt.hpp>
#include <stan/math/prim/fun/mdivide_right_spd.hpp>
#include <stan/math/prim/fun/mdivide_right_tri.hpp>
#include <stan/math/prim/fun/mdivide_right_tri_low.hpp>
#include <stan/math/prim/fun/mean.hpp>
#include <stan/math/prim/fun/min.hpp>
#include <stan/math/prim/fun/minus.hpp>
#include <stan/math/prim/fun/modified_bessel_first_kind.hpp>
#include <stan/math/prim/fun/modified_bessel_second_kind.hpp>
#include <stan/math/prim/fun/modulus.hpp>
#include <stan/math/prim/fun/multiply.hpp>
#include <stan/math/prim/fun/multiply_log.hpp>
#include <stan/math/prim/fun/multiply_lower_tri_self_transpose.hpp>
#include <stan/math/prim/fun/norm.hpp>
#include <stan/math/prim/fun/num_elements.hpp>
#include <stan/math/prim/fun/offset_multiplier_constrain.hpp>
#include <stan/math/prim/fun/offset_multiplier_free.hpp>
#include <stan/math/prim/fun/one_hot_array.hpp>
#include <stan/math/prim/fun/one_hot_int_array.hpp>
#include <stan/math/prim/fun/one_hot_row_vector.hpp>
#include <stan/math/prim/fun/one_hot_vector.hpp>
#include <stan/math/prim/fun/ones_array.hpp>
#include <stan/math/prim/fun/ones_int_array.hpp>
#include <stan/math/prim/fun/ones_row_vector.hpp>
#include <stan/math/prim/fun/ones_vector.hpp>
#include <stan/math/prim/fun/ordered_constrain.hpp>
#include <stan/math/prim/fun/ordered_free.hpp>
#include <stan/math/prim/fun/owens_t.hpp>
#include <stan/math/prim/fun/Phi.hpp>
#include <stan/math/prim/fun/Phi_approx.hpp>
#include <stan/math/prim/fun/polar.hpp>
#include <stan/math/prim/fun/positive_constrain.hpp>
#include <stan/math/prim/fun/positive_free.hpp>
#include <stan/math/prim/fun/positive_ordered_constrain.hpp>
#include <stan/math/prim/fun/positive_ordered_free.hpp>
#include <stan/math/prim/fun/pow.hpp>
#include <stan/math/prim/fun/primitive_value.hpp>
#include <stan/math/prim/fun/prob_constrain.hpp>
#include <stan/math/prim/fun/prob_free.hpp>
#include <stan/math/prim/fun/prod.hpp>
#include <stan/math/prim/fun/proj.hpp>
#include <stan/math/prim/fun/promote_elements.hpp>
#include <stan/math/prim/fun/promote_scalar.hpp>
#include <stan/math/prim/fun/qr_Q.hpp>
#include <stan/math/prim/fun/qr_R.hpp>
#include <stan/math/prim/fun/qr_thin_Q.hpp>
#include <stan/math/prim/fun/qr_thin_R.hpp>
#include <stan/math/prim/fun/quad_form.hpp>
#include <stan/math/prim/fun/quad_form_diag.hpp>
#include <stan/math/prim/fun/quad_form_sym.hpp>
#include <stan/math/prim/fun/rank.hpp>
#include <stan/math/prim/fun/read_corr_L.hpp>
#include <stan/math/prim/fun/read_corr_matrix.hpp>
#include <stan/math/prim/fun/read_cov_L.hpp>
#include <stan/math/prim/fun/read_cov_matrix.hpp>
#include <stan/math/prim/fun/real.hpp>
#include <stan/math/prim/fun/rep_array.hpp>
#include <stan/math/prim/fun/rep_matrix.hpp>
#include <stan/math/prim/fun/rep_row_vector.hpp>
#include <stan/math/prim/fun/rep_vector.hpp>
#include <stan/math/prim/fun/resize.hpp>
#include <stan/math/prim/fun/reverse.hpp>
#include <stan/math/prim/fun/rising_factorial.hpp>
#include <stan/math/prim/fun/round.hpp>
#include <stan/math/prim/fun/row.hpp>
#include <stan/math/prim/fun/rows.hpp>
#include <stan/math/prim/fun/rows_dot_product.hpp>
#include <stan/math/prim/fun/rows_dot_self.hpp>
#include <stan/math/prim/fun/scalbn.hpp>
#include <stan/math/prim/fun/scale_matrix_exp_multiply.hpp>
#include <stan/math/prim/fun/scaled_add.hpp>
#include <stan/math/prim/fun/sd.hpp>
#include <stan/math/prim/fun/segment.hpp>
#include <stan/math/prim/fun/sign.hpp>
#include <stan/math/prim/fun/signbit.hpp>
#include <stan/math/prim/fun/simplex_constrain.hpp>
#include <stan/math/prim/fun/simplex_free.hpp>
#include <stan/math/prim/fun/sin.hpp>
#include <stan/math/prim/fun/singular_values.hpp>
#include <stan/math/prim/fun/sinh.hpp>
#include <stan/math/prim/fun/size.hpp>
#include <stan/math/prim/fun/size_mvt.hpp>
#include <stan/math/prim/fun/size_zero.hpp>
#include <stan/math/prim/fun/softmax.hpp>
#include <stan/math/prim/fun/sort_asc.hpp>
#include <stan/math/prim/fun/sort_desc.hpp>
#include <stan/math/prim/fun/sort_indices.hpp>
#include <stan/math/prim/fun/sort_indices_asc.hpp>
#include <stan/math/prim/fun/sort_indices_desc.hpp>
#include <stan/math/prim/fun/sqrt.hpp>
#include <stan/math/prim/fun/square.hpp>
#include <stan/math/prim/fun/squared_distance.hpp>
#include <stan/math/prim/fun/stan_print.hpp>
#include <stan/math/prim/fun/step.hpp>
#include <stan/math/prim/fun/sub_col.hpp>
#include <stan/math/prim/fun/sub_row.hpp>
#include <stan/math/prim/fun/subtract.hpp>
#include <stan/math/prim/fun/sum.hpp>
#include <stan/math/prim/fun/tail.hpp>
#include <stan/math/prim/fun/tan.hpp>
#include <stan/math/prim/fun/tanh.hpp>
#include <stan/math/prim/fun/tcrossprod.hpp>
#include <stan/math/prim/fun/tgamma.hpp>
#include <stan/math/prim/fun/to_array_1d.hpp>
#include <stan/math/prim/fun/to_array_2d.hpp>
#include <stan/math/prim/fun/to_matrix.hpp>
#include <stan/math/prim/fun/to_row_vector.hpp>
#include <stan/math/prim/fun/to_vector.hpp>
#include <stan/math/prim/fun/trace.hpp>
#include <stan/math/prim/fun/trace_gen_inv_quad_form_ldlt.hpp>
#include <stan/math/prim/fun/trace_gen_quad_form.hpp>
#include <stan/math/prim/fun/trace_inv_quad_form_ldlt.hpp>
#include <stan/math/prim/fun/trace_quad_form.hpp>
#include <stan/math/prim/fun/transpose.hpp>
#include <stan/math/prim/fun/trigamma.hpp>
#include <stan/math/prim/fun/trunc.hpp>
#include <stan/math/prim/fun/typedefs.hpp>
#include <stan/math/prim/fun/ub_constrain.hpp>
#include <stan/math/prim/fun/ub_free.hpp>
#include <stan/math/prim/fun/uniform_simplex.hpp>
#include <stan/math/prim/fun/unit_vector_constrain.hpp>
#include <stan/math/prim/fun/unit_vector_free.hpp>
#include <stan/math/prim/fun/value_of.hpp>
#include <stan/math/prim/fun/value_of_rec.hpp>
#include <stan/math/prim/fun/variance.hpp>
#include <stan/math/prim/fun/welford_covar_estimator.hpp>
#include <stan/math/prim/fun/welford_var_estimator.hpp>
#include <stan/math/prim/fun/zeros_array.hpp>
#include <stan/math/prim/fun/zeros_int_array.hpp>
#include <stan/math/prim/fun/zeros_row_vector.hpp>
#include <stan/math/prim/fun/zeros_vector.hpp>
#endif