[CppAD] Re: vector<bool>
Brad Bell
bradbell at seanet.com
Thu Oct 20 12:01:03 EDT 2005
Thanks for the comments about why a packed version of boolean vectors
should not have been made a specialization of std::vector.
SimpleVectors, as defined by
http://www.coin-or.org/CppAD/Doc/simplevector.htm
are not necessarily containers, on the other hand it is possible that
some day CppAD::vector
http://www.coin-or.org/CppAD/Doc/cppad_vector.htm
may be extended to be both a simple vector and a container. As per Bobs
comments in
http://list.coin-or.org/pipermail/cppad/2005-October/000003.html
this would not be possible if CppAD::vector<bool> uses packed memory
allocation.
Another drawback to packing booleans is speed considerations.
Thus a separate class was created for this purpose, see the heading
vectorBool in
http://www.coin-or.org/CppAD/Doc/cppad_vector.htm
P.S.
Packed boolean vectors were added to CppAD in preparation for computing
sparsity structure for Jacobians and Hessians.
More information about the CppAD
mailing list