| Stan Math Library 2.6.3 probability, sampling & optimization

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
max_size_mvt.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_MAX_SIZE_MVT_HPP
2 #define STAN_MATH_PRIM_SCAL_META_MAX_SIZE_MVT_HPP
3
4 #include <stan/math/prim/scal/meta/length_mvt.hpp>
5 #include <cstdlib>
6
7 namespace stan {
8
9 template <typename T1, typename T2>
10 size_t max_size_mvt(const T1& x1, const T2& x2) {
11 size_t result = length_mvt(x1);
12 result = result > length_mvt(x2) ? result : length_mvt(x2);
13 return result;
14 }
15
16 template <typename T1, typename T2, typename T3>
17 size_t max_size_mvt(const T1& x1, const T2& x2, const T3& x3) {
18 size_t result = length_mvt(x1);
19 result = result > length_mvt(x2) ? result : length_mvt(x2);
20 result = result > length_mvt(x3) ? result : length_mvt(x3);
21 return result;
22 }
23
24 template <typename T1, typename T2, typename T3, typename T4>
25 size_t max_size_mvt(const T1& x1, const T2& x2, const T3& x3, const T4& x4) {
26 size_t result = length_mvt(x1);
27 result = result > length_mvt(x2) ? result : length_mvt(x2);
28 result = result > length_mvt(x3) ? result : length_mvt(x3);
29 result = result > length_mvt(x4) ? result : length_mvt(x4);
30 return result;
31 }
32
33 }
34 #endif
35
stan::max_size_mvt
size_t max_size_mvt(const T1 &x1, const T2 &x2)
Definition: max_size_mvt.hpp:10
length_mvt.hpp
stan::length_mvt
size_t length_mvt(const T &)
Definition: length_mvt.hpp:12

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