Stan Math Library  2.20.0
reverse mode automatic differentiation
unit_vector_free.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_UNIT_VECTOR_FREE_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_UNIT_VECTOR_FREE_HPP
3 
7 #include <cmath>
8 
9 namespace stan {
10 namespace math {
11 
21 template <typename T>
22 Eigen::Matrix<T, Eigen::Dynamic, 1> unit_vector_free(
23  const Eigen::Matrix<T, Eigen::Dynamic, 1>& x) {
24  check_unit_vector("stan::math::unit_vector_free", "Unit vector variable", x);
25  return x;
26 }
27 
28 } // namespace math
29 } // namespace stan
30 #endif
void check_unit_vector(const char *function, const char *name, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)
Check if the specified vector is unit vector.
Eigen::Matrix< T, Eigen::Dynamic, 1 > unit_vector_free(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x)
Transformation of a unit length vector to a "free" vector However, we are just fixing the unidentifie...

     [ Stan Home Page ] © 2011–2018, Stan Development Team.