TVecTemp.h
Classes
- TabVecTemp -- Templated table vectors held in memory as a temporary (full description)
Interface
- Public Members
- TabVecTemp (const Vector<T>&)
- TabVecTemp (uInt leng)
- ~TabVecTemp()
- inline const T& operator() (uInt index) const
- inline T& operator() (uInt index)
- T value (uInt index) const
- void getVal (uInt index, T&) const
- void putVal (uInt index, const T&)
- void set (const T&)
Prerequisite
Etymology
TabVecTemp is the class dealing with a table vector when used as
a temporary in math operations.
Synopsis
TabVecTemp objects enable the use of Vector objects as table vectors.
They are used for 2 purposes:
- To convert a Vector to a TableVector. This is used to
allow the use of Vectors in TableVector expressions.
The TabVecTemp object uses the Vector copy constructor,
which is very cheap due to its reference semantics.
- To hold the result of an operation (like addition) on
two TableVector objects.
Motivation
TabVecTemp is derived from TabVecRep and as such a letter for
the envelope class TableVector.
Template Type Argument Requirements (T)
- Default constructor
- Copy constructor
- Assignment operator
To Do
- In the future temporary results may need to use a file,
because table vectors can potentially be very, very long.
Member Description
Create table vector containing the given Vector (reference semantics).
It will set the origin to zero.
Create table vector containing a Vector with given length.
Destruct the object.
inline const T& operator() (uInt index) const
Return a reference to a value.
inline T& operator() (uInt index)
Return a reference to a value.
T value (uInt index) const
Get a value (virtual function).
void getVal (uInt index, T&) const
Get a value (virtual function).
void putVal (uInt index, const T&)
Put a value (virtual function).
void set (const T&)
Set entire vector to a value.