chsvlib
chsv helper source code

◆ is_identity_matrix()

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

Checks whether a matrix given by an array of columns is an identity matrix.

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 is an identity matrix. Otherwise, false.