Typedefs | Functions
rvalue_return_test.cpp File Reference
#include <typeinfo>
#include <boost/type_traits/is_same.hpp>
#include <stan/model/indexing/rvalue_return.hpp>
#include <gtest/gtest.h>

Go to the source code of this file.

Typedefs

typedef std::vector< double > doubles
 
typedef std::vector< doublesdoubless
 
typedef Eigen::MatrixXd mat
 
typedef std::vector< matmats
 
typedef std::vector< matsmatss
 
typedef Eigen::VectorXd vec
 
typedef std::vector< vecvecs
 
typedef std::vector< vecsvecss
 
typedef Eigen::RowVectorXd rowvec
 
typedef std::vector< rowvecrowvecs
 
typedef std::vector< rowvecsrowvecss
 
typedef cons_index_list< index_uni, nil_index_listuni
 
typedef cons_index_list< index_multi, nil_index_listmulti
 
typedef cons_index_list< index_uni, uniuni_uni
 
typedef cons_index_list< index_uni, multiuni_multi
 
typedef cons_index_list< index_multi, unimulti_uni
 
typedef cons_index_list< index_multi, multimulti_multi
 
typedef cons_index_list< index_uni, uni_uniuni_uni_uni
 
typedef cons_index_list< index_uni, uni_multiuni_uni_multi
 
typedef cons_index_list< index_uni, multi_uniuni_multi_uni
 
typedef cons_index_list< index_uni, multi_multiuni_multi_multi
 
typedef cons_index_list< index_multi, uni_unimulti_uni_uni
 
typedef cons_index_list< index_multi, uni_multimulti_uni_multi
 
typedef cons_index_list< index_multi, multi_unimulti_multi_uni
 
typedef cons_index_list< index_multi, multi_multimulti_multi_multi
 

Functions

template<typename T , typename C , typename I >
void expect_same ()
 
 TEST (modelIndexing, rvalueReturnNil)
 
 TEST (modelIndex, rvalueReturnUni)
 
 TEST (modelIndex, rvalueReturnMulti)
 
 TEST (modelIndex, rvalueReturnUniUni)
 
 TEST (modelIndex, rvalueReturnUniMulti)
 
 TEST (modelIndex, rvalueReturnMultiUni)
 
 TEST (modelIndex, rvalueReturnMultiMulti)
 

Typedef Documentation

typedef std::vector<double> doubles

Definition at line 16 of file rvalue_return_test.cpp.

typedef std::vector<doubles> doubless

Definition at line 17 of file rvalue_return_test.cpp.

typedef Eigen::MatrixXd mat

Definition at line 19 of file rvalue_return_test.cpp.

typedef std::vector<mat> mats

Definition at line 20 of file rvalue_return_test.cpp.

typedef std::vector<mats> matss

Definition at line 21 of file rvalue_return_test.cpp.

Definition at line 32 of file rvalue_return_test.cpp.

Definition at line 37 of file rvalue_return_test.cpp.

Definition at line 46 of file rvalue_return_test.cpp.

Definition at line 45 of file rvalue_return_test.cpp.

Definition at line 36 of file rvalue_return_test.cpp.

Definition at line 44 of file rvalue_return_test.cpp.

Definition at line 43 of file rvalue_return_test.cpp.

typedef Eigen::RowVectorXd rowvec

Definition at line 27 of file rvalue_return_test.cpp.

typedef std::vector<rowvec> rowvecs

Definition at line 28 of file rvalue_return_test.cpp.

typedef std::vector<rowvecs> rowvecss

Definition at line 29 of file rvalue_return_test.cpp.

Definition at line 31 of file rvalue_return_test.cpp.

Definition at line 35 of file rvalue_return_test.cpp.

Definition at line 42 of file rvalue_return_test.cpp.

Definition at line 41 of file rvalue_return_test.cpp.

Definition at line 34 of file rvalue_return_test.cpp.

Definition at line 40 of file rvalue_return_test.cpp.

Definition at line 39 of file rvalue_return_test.cpp.

typedef Eigen::VectorXd vec

Definition at line 23 of file rvalue_return_test.cpp.

typedef std::vector<vec> vecs

Definition at line 24 of file rvalue_return_test.cpp.

typedef std::vector<vecs> vecss

Definition at line 25 of file rvalue_return_test.cpp.

Function Documentation

template<typename T , typename C , typename I >
void expect_same ( )

Definition at line 49 of file rvalue_return_test.cpp.

References C, allTimeWatchdog::endl, and T.

Referenced by TEST().

49  {
50  EXPECT_TRUE(( boost::is_same<T,
51  typename rvalue_return<C, I>::type>::value ))
52  << "type(T)=" << typeid(T).name() << std::endl
53  << "type(C)=" << typeid(C).name() << std::endl
54  << "type(I)=" << typeid(I).name() << std::endl
55  << "rvalue_return=" << typeid(typename rvalue_return<C, I>::type).name()
56  << std::endl
57  << std::endl;
58 }
const XML_Char * name
Definition: expat.h:151
const double C
const XML_Char int const XML_Char * value
Definition: expat.h:331
double T
Definition: Xdiff_gwt.C:5
TEST ( modelIndexing  ,
rvalueReturnNil   
)

Definition at line 62 of file rvalue_return_test.cpp.

References expect_same().

62  {
63  expect_same<double,
64  double, nil_index_list>();
70  mat, nil_index_list>();
72  mats, nil_index_list>();
76  vec, nil_index_list>();
78  vecs, nil_index_list>();
87 }
std::vector< mats > matss
Eigen::RowVectorXd rowvec
std::vector< doubles > doubless
std::vector< mat > mats
Eigen::VectorXd vec
std::vector< rowvecs > rowvecss
std::vector< vecs > vecss
std::vector< rowvec > rowvecs
std::vector< vec > vecs
Eigen::MatrixXd mat
void expect_same()
std::vector< double > doubles
TEST ( modelIndex  ,
rvalueReturnUni   
)

Definition at line 89 of file rvalue_return_test.cpp.

References expect_same().

89  {
90  expect_same<double,
91  doubles, uni>();
93  doubless, uni>();
94  expect_same<double,
95  vec, uni>();
97  vecs, uni>();
99  vecss, uni>();
100  expect_same<double,
101  rowvec, uni>();
103  rowvecs, uni>();
105  rowvecss, uni>();
107  mat, uni>();
109  mats, uni>();
111  matss, uni>();
112 }
std::vector< mats > matss
Eigen::RowVectorXd rowvec
std::vector< doubles > doubless
std::vector< mat > mats
Eigen::VectorXd vec
std::vector< rowvecs > rowvecss
std::vector< vecs > vecss
std::vector< rowvec > rowvecs
std::vector< vec > vecs
Eigen::MatrixXd mat
void expect_same()
std::vector< double > doubles
TEST ( modelIndex  ,
rvalueReturnMulti   
)

Definition at line 114 of file rvalue_return_test.cpp.

References expect_same().

114  {
116  doubles, multi>();
118  doubless, multi>();
120  mats, multi>();
122  matss, multi>();
124  vecs, multi>();
126  vecss, multi>();
128  rowvecs, multi>();
130  rowvecss, multi>();
131 }
std::vector< mats > matss
std::vector< doubles > doubless
std::vector< mat > mats
std::vector< rowvecs > rowvecss
std::vector< vecs > vecss
std::vector< rowvec > rowvecs
std::vector< vec > vecs
void expect_same()
std::vector< double > doubles
TEST ( modelIndex  ,
rvalueReturnUniUni   
)

Definition at line 133 of file rvalue_return_test.cpp.

References expect_same().

133  {
134  expect_same<double,
135  doubless, uni_uni>();
136  expect_same<double,
137  vecs, uni_uni>();
139  vecss, uni_uni>();
140  expect_same<double,
141  rowvecs, uni_uni>();
143  rowvecss, uni_uni>();
144  expect_same<double,
145  mat, uni_uni>();
147  mats, uni_uni>();
149  matss, uni_uni>();
150 }
std::vector< mats > matss
Eigen::RowVectorXd rowvec
std::vector< doubles > doubless
std::vector< mat > mats
Eigen::VectorXd vec
std::vector< rowvecs > rowvecss
std::vector< vecs > vecss
std::vector< rowvec > rowvecs
std::vector< vec > vecs
Eigen::MatrixXd mat
void expect_same()
TEST ( modelIndex  ,
rvalueReturnUniMulti   
)

Definition at line 152 of file rvalue_return_test.cpp.

References expect_same().

152  {
154  doubless, uni_multi>();
156  vecs, uni_multi>();
158  vecss, uni_multi>();
160  rowvecs, uni_multi>();
162  rowvecss, uni_multi>();
164  mat, uni_multi>();
166  mats, uni_multi>();
168  matss, uni_multi>();
169 }
std::vector< mats > matss
Eigen::RowVectorXd rowvec
std::vector< doubles > doubless
std::vector< mat > mats
Eigen::VectorXd vec
std::vector< rowvecs > rowvecss
std::vector< vecs > vecss
std::vector< rowvec > rowvecs
std::vector< vec > vecs
Eigen::MatrixXd mat
void expect_same()
std::vector< double > doubles
TEST ( modelIndex  ,
rvalueReturnMultiUni   
)

Definition at line 171 of file rvalue_return_test.cpp.

References expect_same().

171  {
173  doubless, multi_uni>();
175  vecs, multi_uni>();
177  vecss, multi_uni>();
179  rowvecs, multi_uni>();
181  rowvecss, multi_uni>();
183  mat, multi_uni>();
185  mats, multi_uni>();
187  matss, multi_uni>();
188 }
std::vector< mats > matss
std::vector< doubles > doubless
std::vector< mat > mats
Eigen::VectorXd vec
std::vector< rowvecs > rowvecss
std::vector< vecs > vecss
std::vector< rowvec > rowvecs
std::vector< vec > vecs
Eigen::MatrixXd mat
void expect_same()
std::vector< double > doubles
TEST ( modelIndex  ,
rvalueReturnMultiMulti   
)

Definition at line 190 of file rvalue_return_test.cpp.

References expect_same().

190  {
192  doubless, multi_multi>();
194  vecs, multi_multi>();
196  vecss, multi_multi>();
198  rowvecs, multi_multi>();
200  rowvecss, multi_multi>();
202  mat, multi_multi>();
204  mats, multi_multi>();
206  matss, multi_multi>();
207 }
std::vector< mats > matss
std::vector< doubles > doubless
std::vector< mat > mats
std::vector< rowvecs > rowvecss
std::vector< vecs > vecss
std::vector< rowvec > rowvecs
std::vector< vec > vecs
Eigen::MatrixXd mat
void expect_same()