MCPcopy Create free account
hub / github.com/coin-or/CppAD / RevSparseJac

Function RevSparseJac

example/sparse/rev_sparse_jac.cpp:159–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157# include <vector>
158# include <valarray>
159bool 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++

Callers 1

SparseJacobianMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected