Automatic Differentiation
 
Loading...
Searching...
No Matches
columns_dot_self.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_COLUMNS_DOT_SELF_HPP
2#define STAN_MATH_PRIM_FUN_COLUMNS_DOT_SELF_HPP
3
6
7namespace stan {
8namespace math {
9
19template <typename T, require_eigen_t<T>* = nullptr,
20 require_not_eigen_vt<is_var, T>* = nullptr>
21inline Eigen::Matrix<value_type_t<T>, 1, T::ColsAtCompileTime> columns_dot_self(
22 const T& x) {
23 return x.colwise().squaredNorm();
24}
25
26} // namespace math
27} // namespace stan
28
29#endif
auto columns_dot_self(const T &a)
Returns the dot product of each column of a matrix with itself.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9