Replies: 2 comments
-
I find CppAD::vector easier to use than std::vector because it does error checking for the [] operator for indices out of range (when NDEBUG is not defined). It also does this for its iterators. In addition, the CppAD vector class is much easier to use in the debugger (simpler to view the data). Sometimes, I make it a configuration option to choose CppAD::vector or std::vector. There are other vector classes that do index error checking; e.g. Eigen's vector class |
Beta Was this translation helpful? Give feedback.
-
Another thing I forgot to mention is that CppAD::vector using the multi-threading allocator Perhaps it would be interesting to test the speed of std::vector versus CppAD::vector for some multi-threading examples. |
Beta Was this translation helpful? Give feedback.
-
Is there a reason to prefer
CppAD::vector<AD<double>>
overstd::vector<AD<double>>
as long as we can calculate Jacobian and Hessian for both inputs?Beta Was this translation helpful? Give feedback.
All reactions