Stan
2.5.0
probability, sampling & optimization
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
stan
math
error_handling
matrix
check_multiplicable.hpp
Go to the documentation of this file.
1
#ifndef STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_MULTIPLICABLE_HPP
2
#define STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_MULTIPLICABLE_HPP
3
4
#include <sstream>
5
#include <
stan/meta/traits.hpp
>
6
#include <
stan/math/error_handling/dom_err.hpp
>
7
#include <
stan/math/matrix/Eigen.hpp
>
8
#include <
stan/math/error_handling/matrix/check_size_match.hpp
>
9
10
namespace
stan {
11
namespace
math {
12
13
// NOTE: this will not throw if y1 or y2 contains nan values.
14
template
<
typename
T1,
typename
T2,
typename
T_result>
15
inline
bool
check_multiplicable
(
const
char
*
function
,
16
const
T1& y1,
17
const
char
* name1,
18
const
T2& y2,
19
const
char
* name2,
20
T_result* result) {
21
stan::math::check_size_match
(
function
,y1.cols(),
"Columns of matrix 1"
,
22
y2.rows(),
"Rows of matrix 2"
, result);
23
return
true
;
24
}
25
}
26
}
27
#endif
dom_err.hpp
check_size_match.hpp
stan::math::check_size_match
bool check_size_match(const char *function, T_size1 i, const char *name_i, T_size2 j, const char *name_j, T_result *result)
Definition:
check_size_match.hpp:13
traits.hpp
stan::math::check_multiplicable
bool check_multiplicable(const char *function, const T1 &y1, const char *name1, const T2 &y2, const char *name2, T_result *result)
Definition:
check_multiplicable.hpp:15
Eigen.hpp
[
Stan Home Page
]
© 2011–2014, Stan Development Team.