CppAD: A C++ Algorithmic Differentiation Package  20130918
CppAD::vectorBool Class Reference

List of all members.

Public Types

typedef bool value_type
 type corresponding to the elements of this vector (note that non-const elements actually use vectorBoolElement)

Public Member Functions

size_t capacity (void) const
 maximum number of elements current allocation can store
void clear (void)
 free memory and set number of elements to zero
vectorBooloperator= (const vectorBool &v)
 vector assignment operator
vectorBoolElement operator[] (size_t k)
 non-constant element access; i.e., we can change this element value
bool operator[] (size_t k) const
 constant element access; i.e., we cannot change this element value
void push_back (bool bit)
 add an element to the back of this vector
template<class Vector >
void push_vector (const Vector &v)
 add vector to the back of this vector
void resize (size_t n)
 change number of elements in this vector
size_t size (void) const
 number of elements in this vector
 vectorBool (void)
 default constructor (sets all member data to zero)
 vectorBool (size_t n)
 sizing constructor
 vectorBool (const vectorBool &v)
 copy constructor
 ~vectorBool (void)
 destructor

Private Types

typedef size_t UnitType
 the boolean data is packed with sizeof(UnitType) bits per value

Private Member Functions

size_t unit_min (void)
 minimum number of UnitType values that can store length_ bits (note that this is really a function of length_)

Private Attributes

UnitTypedata_
 pointer to where the bits are stored
size_t length_
 number of bits currently stored in this vector
size_t n_unit_
 number of UnitType values in data_

Static Private Attributes

static const size_t bit_per_unit_ = std::numeric_limits<UnitType>::digits
 number of bits packed into each UnitType value in data_

Detailed Description

Definition at line 618 of file vector.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines