1#ifndef STAN_MATH_PRIM_FUN_MULTIPLY_HPP
2#define STAN_MATH_PRIM_FUN_MULTIPLY_HPP
23template <
typename Mat,
typename Scal, require_stan_scalar_t<Scal>* =
nullptr,
24 require_eigen_t<Mat>* =
nullptr,
25 require_all_not_st_var<Scal, Mat>* =
nullptr,
26 require_all_not_complex_t<Scal, value_type_t<Mat>>* =
nullptr>
43template <
typename Mat,
typename Scal,
62template <
typename Mat,
typename Scal,
65inline auto multiply(
const Scal& m,
const Mat& c) {
79template <
typename Scal,
typename Mat, require_stan_scalar_t<Scal>* =
nullptr,
80 require_eigen_t<Mat>* =
nullptr,
81 require_all_not_st_var<Scal, Mat>* =
nullptr,
82 require_all_not_complex_t<Scal, value_type_t<Mat>>* =
nullptr>
101template <
typename Mat1,
typename Mat2,
104inline auto multiply(
const Mat1& m1,
const Mat2& m2) {
124template <
typename Mat1,
typename Mat2,
128inline auto multiply(
const Mat1& m1,
const Mat2& m2) {
131 return m1.lazyProduct(m2).eval();
147template <
typename RowVec,
typename ColVec,
148 require_not_var_t<return_type_t<RowVec, ColVec>>* =
nullptr,
149 require_eigen_row_and_col_t<RowVec, ColVec>* =
nullptr>
150inline auto multiply(
const RowVec& rv,
const ColVec& v) {
164template <
typename Scalar1,
typename Scalar2,
require_any_t< is_complex< std::decay_t< Types > >... > require_any_complex_t
Require any of the types satisfy is_complex.
require_all_t< container_type_check_base< is_eigen, value_type_t, TypeCheck, Check >... > require_all_eigen_vt
Require all of the types satisfy is_eigen.
require_all_t< is_eigen< std::decay_t< Types > >... > require_all_eigen_t
Require all of the types satisfy is_eigen.
require_t< is_eigen< std::decay_t< T > > > require_eigen_t
Require type satisfies is_eigen.
require_not_t< is_eigen< std::decay_t< T > > > require_not_eigen_t
Require type does not satisfy is_eigen.
require_all_t< is_stan_scalar< std::decay_t< Types > >... > require_all_stan_scalar_t
Require all of the types satisfy is_stan_scalar.
typename return_type< Ts... >::type return_type_t
Convenience type for the return type of the specified template parameters.
void check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Check if the matrices can be multiplied.
auto multiply(const Mat1 &m1, const Mat2 &m2)
Return the product of the specified matrices.
void check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Check if the provided sizes match.
auto dot_product(const T_a &a, const T_b &b)
Returns the dot product of the specified vectors.
require_not_t< math::conjunction< is_eigen_row_vector< Row >, is_eigen_col_vector< Col > > > require_not_eigen_row_and_col_t
Require Row is not a row vector and Col is not a column vector.
std::enable_if_t< Check::value > require_t
If condition is true, template is enabled.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...