Go to the previous, next chapter.

Integer Vector Operations --- IntegerVector.h

This file defines all operations concerning integer vectors and introduces the new data type INTEGER_VECTOR.

Data Type: INTEGER_VECTOR Variable [(Dimension)]
Declares Variable as integer vector. The optional parameter Dimension denotes the initial dimension of the vector. If Dimension is missing, no memory is allocated for the vector elements (this will be done after the vector is resized or after the first assignment to the vector).

The basic operations +, -, *, and /, the unary operators + and - as well as +=, -=, *=, and /= are defined for integer vectors.

If i is an INT expression and v an integer vector, v(i) denotes the i-th element of the vector.

Additionally, the following functions are provided:

Function: INT Dimension (INTEGER_VECTOR v)
Returns the current dimension of v.

Function: void Resize (INTEGER_VECTOR v, INT i)
Discards the old elements of v and resizes v to contain i elements.

Function: void MakeTemporary (INTEGER_VECTOR v)
Defines v to be a temporary variable. This is only important when the improved memory management is used.

See section Vector Operations --- Vector.h, function MakeTemporary for more information.

Function: void MakePermanent (INTEGER_VECTOR v)
Changes the temporary variable v into a permanent one.

See section Configuration, for details.

Function: void Clear (INTEGER_VECTOR v)
Initializes all elements of v with 0.

Function: void Initialize (VECTOR v, INT a)
Initializes all elements of v with a.