Tools.h++ Manual
23-34 104011 Tandem Computers Incorporated
23
RWGVector(
val
)(RWGVector(
val
)& s);
Copy constructor. The entire vector is copied, including all imbedded values.
Public member operators
RWGVector(
val
) operator=(RWGVector(
val
)& s);
Assignment operator. The entire vector is copied.
RWGVector(
val
)& operator=(
val
v);
Sets all elements of self to the value
v
.
val
& operator()(size_t i);
Returns a reference to the the
i
'th element of self. The index
i
must be
between zero and the length of the vector less one. No bounds checking is
performed.
val
& operator[](size_t i);
Returns a reference to the the
i
'th element of self. The index
i
must be
between zero and the length of the vector less one. Bounds checking is
performed.
Public member functions
size_t length() const;
Returns the length of the vector.
void reshape(size_t n);
Resize the vector. If the vector shrinks, it will be truncated. If the vector grows,
then the value of the additional elements will be undeļ¬ned.