Andrew Johnson

Results 115 issues of Andrew Johnson

## Description As mentioned in #2641, the `math::size()` overloads should have a return type consistent with Eigen's `size()` member to avoid compiler errors when calling code such as: ``` Eigen::VectorXd...

## Description The binary overload for `log_sum_exp` currently only accepts two scalar arguments (i.e., not two matrices to operate elementwise on). While the binary overload for `log_diff_exp` does accept two...

## Description The `bernoulli_cdf` function directly subtracts the probability parameter from 1, and then multiplicatively accumulates for vectorised inputs: ``` const T_partials_return Pi = 1 - theta_vec.val(i); P *= Pi;...

## Description The Math library currently has the normalised incomplete gamma functions (`gamma_p` and `gamma_q`), which return values within [0, 1]. The log of the `gamma_p` function is used for...

## Summary This PR adds a framework for vectorising ternary functions, analogous to that of `apply_scalar_binary`. It is compatible with all scalar/container combinations, as well as arbitrarily nested containers. The...

## Description We have some implementations of hypergeometric functions in the Math library ([and more to come](https://github.com/stan-dev/math/pull/2510)), that would be good to expose: - 2F1: gradients partially implemented (#2663), values...

## Description In order to fix the compile errors with multiplying/solving `CWiseUnaryViews` (which originally necessitated the `val_op` and `adj_op` member introductions), I've submitted patches to Eigen's code which are needed...

## Description I'm opening this as a reference issue for implementing the distribution quantile functions, since there are likely to be quite a few PRs along the way. I'll be...

## Description As with the unary and binary functions, it would useful to add a framework for vectorising ternary functions (like `fma`, `inc_beta`, and `if_else`). Eigen has a framework `CwiseTernaryOp`...

## Description Rather than bundling libraries (e.g., Boost/Eigen) with the Math library, it would be good to add functionality to use the libraries that are already installed on the system....