| 157 | # include <vector> |
| 158 | # include <valarray> |
| 159 | bool RevSparseJac(void) |
| 160 | { bool ok = true; |
| 161 | // Run with Vector equal to four different cases |
| 162 | // all of which are Simple Vectors with elements of type bool. |
| 163 | ok &= BoolCases< CppAD::vectorBool >(); |
| 164 | ok &= BoolCases< CppAD::vector <bool> >(); |
| 165 | ok &= BoolCases< std::vector <bool> >(); |
| 166 | ok &= BoolCases< std::valarray <bool> >(); |
| 167 | |
| 168 | |
| 169 | // Run with Vector equal to two different cases both of which are |
| 170 | // Simple Vectors with elements of type std::set<size_t> |
| 171 | typedef std::set<size_t> set; |
| 172 | ok &= SetCases< CppAD::vector <set> >(); |
| 173 | ok &= SetCases< std::vector <set> >(); |
| 174 | |
| 175 | // Do not use valarray because its element access in the const case |
| 176 | // returns a copy instead of a reference |
| 177 | // ok &= SetCases< std::valarray <set> >(); |
| 178 | |
| 179 | return ok; |
| 180 | } |
| 181 | |
| 182 | // END C++ |