chsvlib
chsv helper source code

◆ is_scaling_matrix()

bool Chusov::Math::is_scaling_matrix ( const ValueType *  column_matrix,
std::size_t  n 
)
noexcept

Checks whether a matrix given by an array of columns represents a omnidirectional scaling transformation.

Template Parameters
ValueTypeA type of a matrix element.
Parameters
[in]column_matrixA pointer to an array of columns * rows elements, specifying a set of column vectors composing the matrix.
nA number of columns, which equals the number of rows, in the matrix column_matrix.
Returns
true if the matrix is a scaling matrix with the scaling factor equal in all directions, i.e. the matrix has all elements, except those at the main diagonal, equal zero, and elements on the main diagonal equal to each other (and to the scaling factor shich also can be zero). Otherwise, the function returns false.