Automatic Differentiation
 
Loading...
Searching...
No Matches
identity_free.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_REV_CONSTRAINT_IDENTITY_CONSTRAIN_HPP
2#define STAN_MATH_REV_CONSTRAINT_IDENTITY_CONSTRAIN_HPP
3
7
8namespace stan {
9namespace math {
10
22template <typename T, typename... Types,
23 require_any_var_matrix_t<T, Types...>* = nullptr>
24inline auto identity_free(T&& x, Types&&... /* args */) {
25 return to_var_value(x);
26}
27
28} // namespace math
29} // namespace stan
30
31#endif
require_any_t< is_var_matrix< std::decay_t< Types > >... > require_any_var_matrix_t
Require any of the types satisfy is_var_matrix.
auto identity_free(T &&x, Types &&...)
Returns the result of applying the inverse of the identity constraint transform to the input.
var_value< Eigen::Matrix< double, T::RowsAtCompileTime, T::ColsAtCompileTime > > to_var_value(const T &a)
Converts an Eigen matrix (or vector or row_vector) or expression of vars into var_value.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...