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

Vector of sets of positive integers, each set stored as a singly linked list. More...

List of all members.

Classes

struct  Element
 type used for each set in the vector of sets (note that next is index in data_ for next element in this set). More...

Public Member Functions

 sparse_list (void)
 Default constructor (no sets)
 sparse_list (const sparse_list &v)
 Make use of copy constructor an error.
 ~sparse_list (void)
 Destructor.
void resize (size_t n_set_in, size_t end_in)
 Change number of sets, end marker, 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_source, const sparse_list &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_list &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 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;.
CppAD::pod_vector< Elementdata_
 The data for all the elements in all the sets.
Element next_element_
 next element

Detailed Description

Vector of sets of positive integers, each set stored as a singly linked list.

Definition at line 30 of file sparse_list.hpp.


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