Information Retrieval methods
[Operations for Arrays (Please notice the detailed description!)]

Functions

unsigned ArrayBase::ndim () const
 Returns the number of dimensions.
unsigned ArrayBase::nelem () const
 Returns the total number of elements.
bool ArrayBase::samedim (const ArrayBase &v) const
 Returns true if this array and array "v" have the same dimensions.
unsigned ArrayBase::dim (unsigned i) const
 Returns the size of the i-th dimension of the array.
unsigned int ArrayBase::rows () const
 Returns the number of rows.
unsigned int ArrayBase::cols () const
 Returns the number of columns.
unsigned int Array::rows () const
 Returns the number of rows.
unsigned int Array::cols () const
 Returns the number of columns.

Function Documentation

template<class T>
unsigned int Array< T >::cols (  )  const [inline, inherited]

Returns the number of columns.

Reimplemented from ArrayBase.

Definition at line 1277 of file Array.h.

unsigned int ArrayBase::cols (  )  const [inline, inherited]

Returns the number of columns.

Reimplemented in Array< T >, Array< T ** >, and Array< T * >.

Definition at line 527 of file Array.h.

References ArrayBase::dim(), and ArrayBase::ndim().

Referenced by Array< T * >::cols().

unsigned ArrayBase::dim ( unsigned  i  )  const [inline, inherited]

Returns the size of the i-th dimension of the array.

Parameters:
i the dimension of which the size will be returned.
Returns:
the size of dimension i.
Exceptions:
SharkException the type of the exception will be "range check error" and denotes, that the value of i exceeds the number of dimensions of the array.
Author:
M. Kreutz
Date:
1995-01-01
Changes
none
Status
stable

Definition at line 511 of file Array.h.

References ArrayBase::d, and ArrayBase::nd.

Referenced by Array< T * >::append_cols(), Array< T * >::append_rows(), Array< T * >::col(), Array< T * >::cols(), ArrayBase::cols(), Array< T * >::dimarr(), innerProduct(), outerProduct(), Array< T * >::pos2idx(), prettyprint(), Array< T * >::remove_col(), Array< T * >::remove_cols(), Array< T * >::remove_row(), Array< T * >::rows(), ArrayBase::rows(), sort2DBy1st(), Array< T * >::subarr(), and writeArray().

unsigned ArrayBase::ndim (  )  const [inline, inherited]

Returns the number of dimensions.

The number of dimensions, i.e. the length of the dimension vector d, is returned.

Returns:
the number of dimensions
Author:
M. Kreutz
Date:
1995-01-01
Changes
none
Status
stable

Definition at line 224 of file Array.h.

References ArrayBase::nd.

Referenced by Array< T * >::append_cols(), Array< T * >::append_rows(), Array< T * >::col(), Array< T * >::cols(), ArrayBase::cols(), innerProduct(), outerProduct(), Array< T * >::pos2idx(), prettyprint(), Array< T * >::remove_col(), Array< T * >::remove_cols(), Array< T * >::remove_row(), Array< T * >::rotate_cols(), Array< T * >::rotate_rows(), Array< T * >::rows(), ArrayBase::rows(), Array< T * >::subarr(), Array< T * >::transpose(), and writeArray().

unsigned ArrayBase::nelem (  )  const [inline, inherited]

Returns the total number of elements.

The total number of elements, i.e. the product over all dimensions, is returned.

Returns:
the total number of elements
Author:
M. Kreutz
Date:
1995-01-01
Changes
none
Status
stable

Definition at line 250 of file Array.h.

References ArrayBase::ne.

Referenced by Array< T * >::append_cols(), Array< T * >::append_rows(), clip(), Array< T * >::col(), Array< T * >::cols(), innerProduct(), maxElement(), minElement(), minmaxElement(), operator>>(), outerProduct(), Array< T * >::pos2idx(), product(), readArray(), Array< T * >::remove_col(), Array< T * >::remove_cols(), Array< T * >::remove_row(), Array< T * >::rows(), scalarProduct(), sort(), sqrDistance(), Array< T * >::subarr(), sum(), sumOfAbs(), sumOfSqr(), Array< T * >::transpose(), and writeArray().

template<class T>
unsigned int Array< T >::rows (  )  const [inline, inherited]

Returns the number of rows.

Reimplemented from ArrayBase.

Definition at line 1270 of file Array.h.

unsigned int ArrayBase::rows (  )  const [inline, inherited]

Returns the number of rows.

Reimplemented in Array< T >, Array< T ** >, and Array< T * >.

Definition at line 519 of file Array.h.

References ArrayBase::dim(), and ArrayBase::ndim().

Referenced by Array< T * >::rows().

bool ArrayBase::samedim ( const ArrayBase v  )  const [inline, inherited]

Returns true if this array and array "v" have the same dimensions.

Checks whether two arrays have the same dimensions independent of their types.

Parameters:
v the second array, to which dimensions are compared
Returns:
"true", if the dimensions of both arrays are the same, "false" otherwise
Author:
M. Kreutz
Date:
1995-01-01
Changes
none
Status
stable

Definition at line 279 of file Array.h.

References ArrayBase::d, ArrayBase::nd, and ArrayBase::ne.

Referenced by operator==(), scalarProduct(), and sqrDistance().