Stan  1.3
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
mdivide_right_spd.hpp
Go to the documentation of this file.
1 #ifndef __STAN__MATH__MATRIX__MDIVIDE_RIGHT_SPD_HPP__
2 #define __STAN__MATH__MATRIX__MDIVIDE_RIGHT_SPD_HPP__
3 
4 #include <boost/math/tools/promotion.hpp>
10 
11 namespace stan {
12  namespace math {
13 
23  template <typename T1, typename T2, int R1, int C1, int R2, int C2>
24  inline
25  Eigen::Matrix<typename boost::math::tools::promote_args<T1,T2>::type,R1,C2>
26  mdivide_right_spd(const Eigen::Matrix<T1,R1,C1> &b,
27  const Eigen::Matrix<T2,R2,C2> &A) {
28  stan::math::validate_square(A,"mdivide_right_spd");
29  stan::math::validate_multiplicable(b,A,"mdivide_right_spd");
30  // FIXME: This is nice and general but likely slow.
31  return transpose(mdivide_left_spd(A,transpose(b)));
32 // return promote_common<Eigen::Matrix<T1,R2,C2>,
33 // Eigen::Matrix<T2,R2,C2> >(A)
34 // .transpose()
35 // .lu()
36 // .solve(promote_common<Eigen::Matrix<T1,R1,C1>,
37 // Eigen::Matrix<T2,R1,C1> >(b)
38 // .transpose())
39 // .transpose();
40  }
41 
42  }
43 }
44 #endif

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