TVecMath.h

Classes

Global Functions -- Basic math for table vectors. (full description)
Global Functions -- Transcendental math for table vectors. (full description)
Global Functions -- Further transcendental math for table vectors. (full description)
Global Functions -- Miscellaneous table vector operations. (full description)
Global Functions -- Vector operations on a table vector. (full description)

Basic math for table vectors. (source)

Interface

void tabVecReptvassadd (TabVecRep<T>&, const TabVecRep<T>&)
void tabVecReptvasssub (TabVecRep<T>&, const TabVecRep<T>&)
void tabVecReptvasstim (TabVecRep<T>&, const TabVecRep<T>&)
void tabVecReptvassdiv (TabVecRep<T>&, const TabVecRep<T>&)
void tabVecRepvalassadd (TabVecRep<T>&, const T&)
void tabVecRepvalasssub (TabVecRep<T>&, const T&)
void tabVecRepvalasstim (TabVecRep<T>&, const T&)
void tabVecRepvalassdiv (TabVecRep<T>&, const T&)
TabVecRep<T>& tabVecRepnegate (const TabVecRep<T>&)
TabVecRep<T>& tabVecReptvadd (const TabVecRep<T>&, const TabVecRep<T>&)
TabVecRep<T>& tabVecReptvsub (const TabVecRep<T>&, const TabVecRep<T>&)
TabVecRep<T>& tabVecReptvtim (const TabVecRep<T>&, const TabVecRep<T>&)
TabVecRep<T>& tabVecReptvdiv (const TabVecRep<T>&, const TabVecRep<T>&)
TabVecRep<T>& tabVecRepvalradd (const TabVecRep<T>&, const T&)
TabVecRep<T>& tabVecRepvalrsub (const TabVecRep<T>&, const T&)
TabVecRep<T>& tabVecRepvalrtim (const TabVecRep<T>&, const T&)
TabVecRep<T>& tabVecRepvalrdiv (const TabVecRep<T>&, const T&)
TabVecRep<T>& tabVecRepvalladd (const T&, const TabVecRep<T>&)
TabVecRep<T>& tabVecRepvallsub (const T&, const TabVecRep<T>&)
TabVecRep<T>& tabVecRepvalltim (const T&, const TabVecRep<T>&)
TabVecRep<T>& tabVecRepvalldiv (const T&, const TabVecRep<T>&)

Description

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Synopsis

These global functions do the basic math for table vectors. This means addition, subtraction, multiplication, division and negation. In case two table vectors are used, the left and right operand must be conformant (i.e. have equal length).

Member Description

void tabVecReptvassadd (TabVecRep<T>&, const TabVecRep<T>&)

Add 2 table vectors storing result in first one.

void tabVecReptvasssub (TabVecRep<T>&, const TabVecRep<T>&)

Subtract 2 table vectors storing result in first one.

void tabVecReptvasstim (TabVecRep<T>&, const TabVecRep<T>&)

Multiple 2 table vectors storing result in first one.

void tabVecReptvassdiv (TabVecRep<T>&, const TabVecRep<T>&)

Divide 2 table vectors storing result in first one.

void tabVecRepvalassadd (TabVecRep<T>&, const T&)

Add a scalar to each element in the table vector.

void tabVecRepvalasssub (TabVecRep<T>&, const T&)

Subtract a scalar from each element in the table vector.

void tabVecRepvalasstim (TabVecRep<T>&, const T&)

Multiple each element in the table vector with a scalar.

void tabVecRepvalassdiv (TabVecRep<T>&, const T&)

Divide each element in the table vector by a scalar.

TabVecRep<T>& tabVecRepnegate (const TabVecRep<T>&)

Unary minus - store result in a new vector.

Tip (unary plus is already handled in TabVecMath).

TabVecRep<T>& tabVecReptvadd (const TabVecRep<T>&, const TabVecRep<T>&)

Add 2 table vectors storing result in a new one.

TabVecRep<T>& tabVecReptvsub (const TabVecRep<T>&, const TabVecRep<T>&)

Subtract 2 table vectors storing result in a new one.

TabVecRep<T>& tabVecReptvtim (const TabVecRep<T>&, const TabVecRep<T>&)

Multiple 2 table vectors storing result in a new one.

TabVecRep<T>& tabVecReptvdiv (const TabVecRep<T>&, const TabVecRep<T>&)

Divide 2 table vectors storing result in a new one.

TabVecRep<T>& tabVecRepvalradd (const TabVecRep<T>&, const T&)

Add a scalar to each element in the table vector storing result in a new table vector.

TabVecRep<T>& tabVecRepvalrsub (const TabVecRep<T>&, const T&)

Subtract a scalar from each element in the table vector storing result in a new table vector.

TabVecRep<T>& tabVecRepvalrtim (const TabVecRep<T>&, const T&)

Multiple each element in the table vector with a scalar storing result in a new table vector.

TabVecRep<T>& tabVecRepvalrdiv (const TabVecRep<T>&, const T&)

Divide each element in the table vector by a scalar storing result in a new table vector.

TabVecRep<T>& tabVecRepvalladd (const T&, const TabVecRep<T>&)

Add a scalar to each element in the table vector storing result in a new table vector.

TabVecRep<T>& tabVecRepvallsub (const T&, const TabVecRep<T>&)

Subtract a scalar from each element in the table vector storing result in a new table vector.

TabVecRep<T>& tabVecRepvalltim (const T&, const TabVecRep<T>&)

Multiple each element in the table vector with a scalar storing result in a new table vector.

TabVecRep<T>& tabVecRepvalldiv (const T&, const TabVecRep<T>&)

Divide each element in the table vector by a scalar storing result in a new table vector.

Transcendental math for table vectors. (source)

Interface

TabVecRep<T>& tabVecRepcos (const TabVecRep<T>&)
TabVecRep<T>& tabVecRepcosh (const TabVecRep<T>&)
TabVecRep<T>& tabVecRepexp (const TabVecRep<T>&)
TabVecRep<T>& tabVecReplog (const TabVecRep<T>&)
TabVecRep<T>& tabVecReplog10(const TabVecRep<T>&)
TabVecRep<T>& tabVecReppow (const TabVecRep<T>&, const TabVecRep<T>&)
TabVecRep<T>& tabVecRepsin (const TabVecRep<T>&)
TabVecRep<T>& tabVecRepsinh (const TabVecRep<T>&)
TabVecRep<T>& tabVecRepsqrt (const TabVecRep<T>&)

Description

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Synopsis

These global functions do the transcendental math for table vectors for essentially all numeric types. The functions are sin, sinh, exp, log, pow, etc.. In case two table vectors are used, the left and right operand must be conformant (i.e. have equal length).

Member Description

TabVecRep<T>& tabVecRepcos (const TabVecRep<T>&)

TabVecRep<T>& tabVecRepcosh (const TabVecRep<T>&)

TabVecRep<T>& tabVecRepexp (const TabVecRep<T>&)

TabVecRep<T>& tabVecReplog (const TabVecRep<T>&)

TabVecRep<T>& tabVecReplog10(const TabVecRep<T>&)

TabVecRep<T>& tabVecReppow (const TabVecRep<T>&, const TabVecRep<T>&)

TabVecRep<T>& tabVecRepsin (const TabVecRep<T>&)

TabVecRep<T>& tabVecRepsinh (const TabVecRep<T>&)

TabVecRep<T>& tabVecRepsqrt (const TabVecRep<T>&)


Further transcendental math for table vectors. (source)

Interface

TabVecRep<T>& tabVecRepacos (const TabVecRep<T>&)
TabVecRep<T>& tabVecRepasin (const TabVecRep<T>&)
TabVecRep<T>& tabVecRepatan (const TabVecRep<T>&)
TabVecRep<T>& tabVecRepatan2(const TabVecRep<T>&, const TabVecRep<T>&)
TabVecRep<T>& tabVecRepceil (const TabVecRep<T>&)
TabVecRep<T>& tabVecRepfabs (const TabVecRep<T>&)
TabVecRep<T>& tabVecRepfloor(const TabVecRep<T>&)
TabVecRep<T>& tabVecRepfmod (const TabVecRep<T>&, const TabVecRep<T>&)
TabVecRep<T>& tabVecReppow (const TabVecRep<T>&, const double&)
TabVecRep<T>& tabVecReptan (const TabVecRep<T>&)
TabVecRep<T>& tabVecReptanh (const TabVecRep<T>&)

Description

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Synopsis

These global functions do the transcendental math for table vectors for a limited set of numeric types. The functions are asin, ceil, etc.. In case two table vectors are used, the left and right operand must be conformant (i.e. have equal length).

Member Description

TabVecRep<T>& tabVecRepacos (const TabVecRep<T>&)

TabVecRep<T>& tabVecRepasin (const TabVecRep<T>&)

TabVecRep<T>& tabVecRepatan (const TabVecRep<T>&)

TabVecRep<T>& tabVecRepatan2(const TabVecRep<T>&, const TabVecRep<T>&)

TabVecRep<T>& tabVecRepceil (const TabVecRep<T>&)

TabVecRep<T>& tabVecRepfabs (const TabVecRep<T>&)

TabVecRep<T>& tabVecRepfloor(const TabVecRep<T>&)

TabVecRep<T>& tabVecRepfmod (const TabVecRep<T>&, const TabVecRep<T>&)

TabVecRep<T>& tabVecReppow (const TabVecRep<T>&, const double&)

TabVecRep<T>& tabVecReptan (const TabVecRep<T>&)

TabVecRep<T>& tabVecReptanh (const TabVecRep<T>&)


Miscellaneous table vector operations. (source)

Interface

void tabVecRepminmax (T& min, T& max, const TabVecRep<T>&)
void tabVecRepindgen (TabVecRep<T>&, Int start, Int inc)
T tabVecRepsum (const TabVecRep<T>&)
T tabVecRepproduct (const TabVecRep<T>&)

Description

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Synopsis

Fill a table vector or calculate the sum, product, minimum or maximum of its elements.

Member Description

void tabVecRepminmax (T& min, T& max, const TabVecRep<T>&)

Determine minimum and maximum value in a table vector. Requires that the type "T" has comparison operators.

void tabVecRepindgen (TabVecRep<T>&, Int start, Int inc)

Fills all elements of the table vector with a sequence starting with "start" and incrementing by "inc" for each element.

T tabVecRepsum (const TabVecRep<T>&)

Sum of all the elements of a table vector.

T tabVecRepproduct (const TabVecRep<T>&)

Product of all the elements of a table vector.

Warning product can easily overflow.

Vector operations on a table vector. (source)

Interface

T tabVecRepinnerproduct (const TabVecRep<T>&, const TabVecRep<T>&)
T tabVecRepnorm (const TabVecRep<T>&)
TabVecRep<T>& tabVecRepcrossproduct (const TabVecRep<T>&, const TabVecRep<T>&)

Description

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Synopsis

Do vector operations on a table vector (like inner product).

Member Description

T tabVecRepinnerproduct (const TabVecRep<T>&, const TabVecRep<T>&)

The inner product of 2 table vectors.

T tabVecRepnorm (const TabVecRep<T>&)

The norm of a table vector.

TabVecRep<T>& tabVecRepcrossproduct (const TabVecRep<T>&, const TabVecRep<T>&)

The cross product of 2 table vectors containing 3 elements.