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

Vector of sets of positive integers, each set stored as a standard set. More...

List of all members.

Public Member Functions

 sparse_set (void)
 Default constructor (no sets)
 sparse_set (const sparse_set &v)
 Make use of copy constructor an error.
 ~sparse_set (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_set &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_set &other)
 Assign a set equal to the union of two other sets.
size_t number_elements (void) const
 Sum over all sets of the number of elements.
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 std::set< size_t > Set
 type used for each set in the vector sets

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).
CppAD::vector< Setdata_
 The vector of sets.
size_t next_index_
 index for which we were retrieving next_element (use n_set_ if no such index exists).
Set::iterator next_element_
 Next element that we will return using next_element (use end_ for no such element exists; i.e., past end of the set).

Detailed Description

Vector of sets of positive integers, each set stored as a standard set.

Definition at line 33 of file sparse_set.hpp.


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