Stan  1.3
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
mdivide_left_tri_low.hpp
Go to the documentation of this file.
1 #ifndef __STAN__MATH__MATRIX__MDIVIDE_LEFT_TRI_LOW_HPP__
2 #define __STAN__MATH__MATRIX__MDIVIDE_LEFT_TRI_LOW_HPP__
3 
4 #include <boost/math/tools/promotion.hpp>
7 
8 namespace stan {
9  namespace math {
10 
11  template <typename T1, typename T2, int R1,int C1,int R2,int C2>
12  inline
13  Eigen::Matrix<typename boost::math::tools::promote_args<T1,T2>::type,
14  R1,C2>
15  mdivide_left_tri_low(const Eigen::Matrix<T1,R1,C1> &A,
16  const Eigen::Matrix<T2,R2,C2> &b) {
17 // stan::math::validate_square(A,"mdivide_left_tri_low/2");
18 // stan::math::validate_multiplicable(A,b,"mdivide_left_tri_low");
19 // return promote_common<Eigen::Matrix<T1,R1,C1>,
20 // Eigen::Matrix<T2,R1,C1> >(A)
21 // .template triangularView<Eigen::Lower>()
22 // .solve( promote_common<Eigen::Matrix<T1,R2,C2>,
23 // Eigen::Matrix<T2,R2,C2> >(b) );
24  return mdivide_left_tri<Eigen::Lower,T1,T2,R1,C1,R2,C2>(A,b);
25  }
26  template <typename T,int R1, int C1>
27  inline
28  Eigen::Matrix<T,R1,C1>
30  Eigen::Matrix<T,R1,C1> &A) {
31 // stan::math::validate_square(A,"mdivide_left_tri_low/1");
32 // int n = A.rows();
33 // Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> b;
34 // b.setIdentity(n,n);
35 // A.template triangularView<Eigen::Lower>().solveInPlace(b);
36 // return b;
37  return mdivide_left_tri<Eigen::Lower,T,R1,C1>(A);
38  }
39 
40  }
41 }
42 #endif

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