VECTOR
.
VECTOR Variable [(Dimension)]
The basic operations +, -, *, and /, the unary operators
+ and - as well as +=, -=, *=, and /= are
defined for real vectors.
Comparisons of real vectors are possible with ==, !=, <, <=,
>, and >=. All comparisons are performed componentwise and the result of a
vector comparison is true, if it is true for all components. Otherwise the result is
FALSE
.
If i is an INT
expression and v a vector, v(i)
denotes the i-th element of the vector.
Additionally, the following functions are provided:
INT Dimension (VECTOR v)
void Resize (VECTOR v, INT i)
void MakeTemporary (VECTOR v)
MakeTemporary
should be used for any vector variable which is
returned as a result of a function. For example:
VECTOR Zeros (INT n) // Returns a vector of dimension n with zeros as elements { VECTOR t(n);MakeTemporary (t); Clear (t); return t; }
Caution: If a temporary variable is used on the right-hand part of an assignment, it may loose its contents after the assignment.
See section Configuration, for more information.
void MakePermanent (VECTOR v)
See section Configuration, for details.
void Clear (VECTOR v)
void Initialize (VECTOR v, REAL r)
REAL Sqr (VECTOR v)
REAL Norm (VECTOR v)
REAL Max (VECTOR v)
REAL Min (VECTOR v)