CppAD: A C++ Algorithmic Differentiation Package  20130102
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

 vector (void)
 default constructor sets capacity_ = length_ = data_ = 0
 vector (size_t n)
 sizing constructor
 vector (const vector &x)
 copy constructor
 ~vector (void)
 destructor
size_t capacity (void) const
 maximum number of elements current allocation can store
size_t size (void) const
 number of elements currently in this vector.
void resize (size_t n)
 change the number of elements in this vector.
void clear (void)
 free memory and set number of elements to zero
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.)

Private Attributes

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

Detailed Description

template<class Type>
class vector< Type >

The CppAD Simple Vector template class.

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