Adding content to an Array
[Operations for Arrays (Please notice the detailed description!)]

Functions

Array< T > & Array::append_elem (const T &w)
 Appends value "w" to the current one-dimensional or empty array.
Array< T > & Array::append_elems (const Array< T > &w)
 Appends the values in "w" to the current one-dimensional or empty array.
Array< T > & Array::append_rows (const Array< T > &y)
 Appends the array "y" after the last row of the current array.
Array< T > Array::append_cols (const Array< T > &y) const
 Appends the array "y" after the last column of the current array.

Function Documentation

template<class T>
Array< T > Array< T >::append_cols ( const Array< T > &  y  )  const [inline, inherited]

Appends the array "y" after the last column of the current array.

The current array must be empty or must have the same dimension than array y.
"Column" here always refer to the last dimension of the array.

Parameters:
y the array that will be appended
Returns:
the current array with the appended array y
Exceptions:
SharkException the type of the exception will be "size mismatch" and indicates that the current array has one or more dimensions with the number of dimensions different to that of y
Example
Guess, the current array has the content

$ \left(\begin{array}{llll} 10 & 11 & 12 & 13\\ 14 & 15 & 16 & 17\\ \end{array}\right) $

and the array y has the content

$ \left(\begin{array}{ll} 18 & 19\\ 20 & 21 \end{array}\right) $

Then the resulting array will look like this:

$ \left(\begin{array}{llllll} 10 & 11 & 12 & 13 & 18 & 19\\ 14 & 15 & 16 & 17 & 20 & 21 \end{array}\right) $

Author:
M. Kreutz
Date:
1995-01-01
Changes
none
Status
stable

Definition at line 2632 of file Array.h.

template<class T>
Array< T >& Array< T >::append_elem ( const T &  w  )  [inline, inherited]

Appends value "w" to the current one-dimensional or empty array.

w will be appended to the end of the element vector Array::e.

Parameters:
w the value that will be appended.
Returns:
the current array with the appended value
Exceptions:
SharkException the type of the exception will be "size mismatch" and indicates, that the array has two or more dimensions or that the current array is a static reference, that can not be resized
Author:
M. Kreutz
Date:
1995-01-01
Changes
none
Status
stable

Definition at line 1883 of file Array.h.

template<class T>
Array< T >& Array< T >::append_elems ( const Array< T > &  w  )  [inline, inherited]

Appends the values in "w" to the current one-dimensional or empty array.

The values in w will be appended to the end of the element vector Array::e.

Parameters:
w one-dimensional array with values that will be appended to the current array
Returns:
the current array with the appended values
Exceptions:
SharkException the type of the exception will be "size mismatch" and indicates, that the current array has 2 or more dimensions or that w is not one-dimensional or that the current array is a static array reference, where no elements can be appended
Author:
M. Kreutz
Date:
1995-01-01
Changes
none
Status
stable

Definition at line 1921 of file Array.h.

template<class T>
Array< T >& Array< T >::append_rows ( const Array< T > &  y  )  [inline, inherited]

Appends the array "y" after the last row of the current array.

The current array must be empty or must have the same dimension than array y or must have one dimension more than array y. If the length or "row length" of array y is less than the row length of the current array, the missing "row positions" will be filled by zero values.
"Row" here always refer to the first dimension of the array.

Parameters:
y the array that will be appended
Returns:
the current array with the appended array y
Exceptions:
SharkException the type of the exception will be "size mismatch" and indicates that the number of dimensions of the current array is not compliant to this operation
Example
Guess, the current array has the content

$ \left(\begin{array}{llll} 10 & 11 & 12 & 13\\ 14 & 15 & 16 & 17\\ \end{array}\right) $

and the array y has the content $( 18 \mbox{\ \ } 19 )$.
Then the resulting array will look like this:

$ \left(\begin{array}{llll} 10 & 11 & 12 & 13\\ 14 & 15 & 16 & 17\\ 18 & 19 & 0 & 0 \end{array}\right) $

Author:
M. Kreutz
Date:
1995-01-01
Changes
none
Status
stable

Definition at line 1989 of file Array.h.