Automatic Differentiation
 
Loading...
Searching...
No Matches
rows_dot_self.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_ROWS_DOT_SELF_HPP
2#define STAN_MATH_PRIM_FUN_ROWS_DOT_SELF_HPP
3
6
7namespace stan {
8namespace math {
9
18template <typename T, require_eigen_t<T>* = nullptr,
19 require_not_st_var<T>* = nullptr>
20inline Eigen::Matrix<value_type_t<T>, T::RowsAtCompileTime, 1> rows_dot_self(
21 const T& x) {
22 return x.rowwise().squaredNorm();
23}
24
25} // namespace math
26} // namespace stan
27
28#endif
auto rows_dot_self(T_a &&a)
Returns the dot product of each row 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