Tools.h++ Class Reference

Table Of Contents
Calls the destructor for every element in self.
Public Operators
RWTValVector<T>&
operator=(const RWTValVector<T>& v);
Sets self to the same length as v and then copies all elements of v into self.
RWTValVector<T>&
operator=(const T& ival);
Sets all elements in self to the value ival.
const T&
operator()(size_t i) const;
T&
operator()(size_t i);
Returns a reference to the ith value in the vector. The index i must be between 0 and the
length of the vector less one. No bounds checking is performed.
const T&
operator[](size_t i) const;
T&
operator[](size_t i);
Returns a reference to the ith value in the vector. The index i must be between 0 and the
length of the vector less one. Bounds checking will be performed.
Public Member Functions
const T*
data() const;
Returns a pointer to the raw data of self. 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 set by the default constructor of T.