CppAD: A C++ Algorithmic Differentiation Package  20130102
sparse_pack Class Reference

Vector of sets of postivie integers, each set stored as a packed boolean array. More...

List of all members.

Public Member Functions

 sparse_pack (void)
 Default constructor (no sets)
 sparse_pack (const sparse_pack &v)
 Make use of copy constructor an error.
 ~sparse_pack (void)
 Destructor.
void resize (size_t n_set_in, size_t end_in)
 Change number of sets, set end, and initialize all sets as empty.
void add_element (size_t index, size_t element)
 Add one element to a set.
bool is_element (size_t index, size_t element)
 Is an element of a set.
void begin (size_t index)
 Begin retrieving elements from one of the sets.
size_t next_element (void)
 Get the next element from the current retrieval set.
void clear (size_t target)
 Assign the empty set to one of the sets.
void assignment (size_t this_target, size_t other_value, const sparse_pack &other)
 Assign one set equal to another set.
void binary_union (size_t this_target, size_t this_left, size_t other_right, const sparse_pack &other)
 Assing a set equal to the union of two other sets.
size_t memory (void) const
 Amount of memory used by this vector of sets.
size_t n_set (void) const
 Fetch n_set for vector of sets object.
size_t end (void) const
 Fetch end for this vector of sets object.

Private Types

typedef size_t Pack
 Type used to pack elements (should be the same as corresponding typedef in multiple_n_bit() in test_more/sparse_hacobian.cpp)

Private Attributes

size_t n_set_
 Number of sets that we are representing (set by constructor and resize).
size_t end_
 Possible elements in each set are 0, 1, ..., end_ - 1 (set by constructor and resize).
size_t n_pack_
 Number of Pack values necessary to represent end_ bits. (set by constructor and resize).
pod_vector< Packdata_
 Data for all the sets.
size_t next_index_
 index for which we were retrieving next_element (use n_set_ if no such index exists).
size_t next_element_
 Next element to start search at (use end_ for no such element exists; i.e., past end of the set).

Static Private Attributes

static const size_t n_bit_ = std::numeric_limits<Pack>::digits
 Number of bits per Pack value.

Detailed Description

Vector of sets of postivie integers, each set stored as a packed boolean array.

Definition at line 30 of file sparse_pack.hpp.


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