|
5 | 5 | #include <stan/math/prim/arr/meta/scalar_type.hpp>
|
6 | 6 |
|
7 | 7 | namespace stan {
|
8 |
| - |
| 8 | +/** |
| 9 | + * Template metaprogram defining the base scalar type of |
| 10 | + * values stored in an Eigen matrix. |
| 11 | + * |
| 12 | + * @tparam T type of matrix. |
| 13 | + * @tparam R number of rows for matrix. |
| 14 | + * @tparam C number of columns for matrix. |
| 15 | + */ |
9 | 16 | template <typename T, int R, int C>
|
10 | 17 | struct scalar_type<Eigen::Matrix<T, R, C> > {
|
11 | 18 | typedef typename scalar_type<T>::type type;
|
12 | 19 | };
|
13 | 20 |
|
| 21 | +/** |
| 22 | + * Template metaprogram defining the base scalar type of |
| 23 | + * values stored in a const Eigen matrix. |
| 24 | + * |
| 25 | + * @tparam T type of matrix. |
| 26 | + * @tparam R number of rows for matrix. |
| 27 | + * @tparam C number of columns for matrix. |
| 28 | + */ |
14 | 29 | template <typename T, int R, int C>
|
15 | 30 | struct scalar_type<const Eigen::Matrix<T, R, C> > {
|
16 | 31 | typedef typename scalar_type<T>::type type;
|
17 | 32 | };
|
18 | 33 |
|
| 34 | +/** |
| 35 | + * Template metaprogram defining the base scalar type of |
| 36 | + * values stored in a referenced Eigen matrix. |
| 37 | + * |
| 38 | + * @tparam T type of matrix. |
| 39 | + * @tparam R number of rows for matrix. |
| 40 | + * @tparam C number of columns for matrix. |
| 41 | + */ |
19 | 42 | template <typename T, int R, int C>
|
20 | 43 | struct scalar_type<Eigen::Matrix<T, R, C>&> {
|
21 | 44 | typedef typename scalar_type<T>::type type;
|
22 | 45 | };
|
23 | 46 |
|
| 47 | +/** |
| 48 | + * Template metaprogram defining the base scalar type of |
| 49 | + * values stored in a referenced const Eigen matrix. |
| 50 | + * |
| 51 | + * @tparam T type of matrix. |
| 52 | + * @tparam R number of rows for matrix. |
| 53 | + * @tparam C number of columns for matrix. |
| 54 | + */ |
24 | 55 | template <typename T, int R, int C>
|
25 | 56 | struct scalar_type<const Eigen::Matrix<T, R, C>&> {
|
26 | 57 | typedef typename scalar_type<T>::type type;
|
27 | 58 | };
|
28 | 59 |
|
| 60 | +/** |
| 61 | + * Template metaprogram defining the base scalar type of |
| 62 | + * values stored in an Eigen Block. |
| 63 | + * |
| 64 | + * @tparam T type of block. |
| 65 | + */ |
29 | 66 | template <typename T>
|
30 | 67 | struct scalar_type<Eigen::Block<T> > {
|
31 | 68 | typedef typename scalar_type<T>::type type;
|
|
0 commit comments