Array classes

These are C++ `template' classes: classes defining collections of objects of some general class. The other class is denoted below by `X'. The format of the data depends on the format for X.

Class: Array of X

An array of objects of some class.

Data format:

number_of_objects
For each:
   data for an object of class X

Class: Arithmetic_array of X

An array of objects of some class on which arithmetic operations are defined.

Data format:

number_of_objects
For each:
   data for an object of class X

Class: List of X

An array of objects of some class, for which the number of objects is likely to change during use.

Data format:

number_of_objects
For each:
   data for an object of class X

Class: Named_array of X

An array of objects of some class, for which a name is to be given to each object.

Data format:

number_of_objects
For each:
   name data

Class: Generic_matrix of X

An N-dimensional matrix of objects of some class.

Data format:

number_of_dimensions
For each dimension:
   number of entries
(((...(Vij...l,l=1,nl),...),
   j=1,nj),i=1,ni)
i.e. the matrix is read in with the index of the last dimension varying most quickly.

Class: Arithmetic_matrix of X

An N-dimensional matrix of objects of some class, for which arithmetic operators are defined.

Data format:

number_of_dimensions
For each dimension:
   number of entries
(((...(Vij...l,l=1,nl),...),
   j=1,nj),i=1,ni)
i.e. the matrix is read in with the index of the last dimension varying most quickly.

Class: Arithmetic_matrix_fixed of X

An N-dimensional matrix of objects of some class, for which arithmetic operators are defined, but which is to be used always with the same dimensions. The number of dimensions of the matrix and the number of entries in each dimension should be described in the documentation for the program using this class.

Data format:

(((...(Vij...l,l=1,nl),...),
   j=1,nj),i=1,ni)
i.e. the matrix is read in with the index of the last dimension varying most quickly.