CppAD: A C++ Algorithmic Differentiation Package  20130918
CppAD::vector< Type > Class Template Reference

The CppAD Simple Vector template class. More...

List of all members.

Public Types

typedef Type value_type
 type of the elements in the vector

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
Type * data (void)
 raw pointer to the data
const Type * data (void) const
 const raw pointer to the data
vectoroperator= (const vector &x)
 vector assignment operator
Type & operator[] (size_t i)
 non-constant element access; i.e., we can change this element value
const Type & operator[] (size_t i) const
 constant element access; i.e., we cannot change this element value
void push_back (const Type &s)
 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 (we could not use push_back becasue MS V++ 7.1 did not resolve to non-template member function when scalar is used.)
void resize (size_t n)
 change the number of elements in this vector.
size_t size (void) const
 number of elements currently in this vector.
 vector (void)
 default constructor sets capacity_ = length_ = data_ = 0
 vector (size_t n)
 sizing constructor
 vector (const vector &x)
 copy constructor
 ~vector (void)
 destructor

Private Attributes

size_t capacity_
 maximum number of Type elements current allocation can hold
Type * data_
 pointer to the first type elements (not defined and should not be used when capacity_ = 0)
size_t length_
 number of Type elements currently in this vector

Detailed Description

template<class Type>
class CppAD::vector< Type >

The CppAD Simple Vector template class.

Definition at line 339 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