One¶
-
template<typename T>
struct One<T, std::enable_if_t<IsMatrix<T>>>¶ Defined in
matrix.hpp
.Specialization of the adapter
One
for typesT
such that the value ofIsMatrix<T>
istrue
.- Tparam
T the type of matrices.
-
inline T operator()(T const &x) const¶
Returns the identity matrix.
- param x
a matrix of type
T
.- returns
a matrix of type
T
.- exceptions
This function guarantees not to throw a
LibsemigroupsException
.
- Complexity
\(O(m ^ 2)\) where \(m\) is the number of rows of the matrix
x
.
Warning
This function only works for square matrices.
See also
See
static StaticMatrix StaticMatrix::identity
, orstatic DynamicMatrix DynamicMatrix::identity(size_t n)
for further details.