wvMatrixStat(3) USC Math Department
Back to wvlib matrix function index
wvMatrixStat(3)

Name

wvMatrixGetDimensionality, wvMatrixSize, wvIsSingletonMatrix - matrix statistics functions

Synopsis

#include <wv/matrix.h>

WVdimensionIndex wvMatrixGetDimensionality(const WVmatrix *matrix);

WVindexVector *wvMatrixSize({const} WVmatrix *matrix);

wvBool wvIsSingletonMatrix(const WVmatrix *matrix);

Description

wvMatrixGetDimensionality returns the number of dimensions of matrix.

wvMatrixSize returns a pointer to the indexVector that reflects the size of the matrix. This is a pointer to the actual index vector element of the matrix structure, so changes to it will change the effective size of the matrix (but not the space allocated for it).

This can be useful to reduce the size of a matrix temporarily and then reset the size to its larger initial value. But care must be taken to ensure that the size is never set to something larger than the size of the matrix when it was created.

wvIsSingletonMatrix returns wvTrue if matrix is a singleton matrix, wvFalse otherwise. A singleton matrix is a matrix with only one element.

See Also

wvNewMatrix(3), wvIndexVectorSub(3)

Caveat

Results of accesses made to matrix if the size has been set to something larger than the initial size of the matrix are undefined.

Back to wvlib matrix function index Last Updated: 02 February 1999