Tools.h++ Manual

22-68 104011 Tandem Computers Incorporated
22
T*& operator[](size_t i);
T* operator[](size_t i) const;
Returns a pointer to the
i
'th value in the vector. The first variant can be used
as an l-value, the second cannot. The index i must be between zero and the
length of the vector, less one, or an exception of type
TOOL_INDEX
will be
thrown.
Public member functions
T* const * data() const;
Returns a pointer to the raw data of the vector. Should be used with care.
size_t length() const;
Returns the length of the vector.
void reshape(size_t N);
Changes the length of the vector to
N
. If this results in the vector being
lengthened, then the initial value of the additional elements is undefined.
void resize(size_t N);
Changes the length of the vector to
N
. If this results in the vector being
lengthened, then the initial value of the additional elements is set to zero.