Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mdivide_right_tri_low.hpp
Go to the documentation of this file.
1 #ifndef STAN__MATH__MATRIX__MDIVIDE_RIGHT_TRI_LOW_HPP
2 #define STAN__MATH__MATRIX__MDIVIDE_RIGHT_TRI_LOW_HPP
3 
4 #include <boost/math/tools/promotion.hpp>
8 
9 namespace stan {
10  namespace math {
11 
21  template <typename T1, typename T2, int R1,int C1,int R2,int C2>
22  inline
23  Eigen::Matrix<typename boost::math::tools::promote_args<T1,T2>::type,R1,C2>
24  mdivide_right_tri_low(const Eigen::Matrix<T1,R1,C1> &b,
25  const Eigen::Matrix<T2,R2,C2> &A) {
26  return mdivide_right_tri<Eigen::Lower>
27  (promote_common<Eigen::Matrix<T1,R1,C1>,
28  Eigen::Matrix<T2,R1,C1> >(b),
29  promote_common<Eigen::Matrix<T1,R2,C2>,
30  Eigen::Matrix<T2,R2,C2> >(A));
31  }
32 
33  }
34 }
35 #endif
Eigen::Matrix< typename boost::math::tools::promote_args< T1, T2 >::type, R1, C2 > mdivide_right_tri_low(const Eigen::Matrix< T1, R1, C1 > &b, const Eigen::Matrix< T2, R2, C2 > &A)
Returns the solution of the system tri(A)x=b when tri(A) is a lower triangular view of the matrix A...
common_type< T1, T2 >::type promote_common(const F &u)

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