Automatic Differentiation
 
Loading...
Searching...
No Matches
crossprod.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_CROSSPROD_HPP
2#define STAN_MATH_PRIM_FUN_CROSSPROD_HPP
3
7
8namespace stan {
9namespace math {
10
19template <typename EigMat, require_eigen_t<EigMat>* = nullptr>
20inline auto crossprod(const EigMat& M) {
21 return tcrossprod(M.transpose());
22}
23
24} // namespace math
25} // namespace stan
26
27#endif
Eigen::Matrix< value_type_t< EigMat >, EigMat::RowsAtCompileTime, EigMat::RowsAtCompileTime > tcrossprod(const EigMat &m)
matrix_cl< typename std::decay_t< T_A >::Scalar > crossprod(T_A &&A)
Returns the result of pre-multiplying a matrix by its own transpose.
Definition crossprod.hpp:21
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...