Macaulay2 Engine
Loading...
Searching...
No Matches

◆ IM2_MutableMatrix_identity()

MutableMatrix * IM2_MutableMatrix_identity ( const Ring * R,
int nrows,
M2_bool prefer_dense )

MutableMatrix interface routines

Also: Fraction free LU decomposition LLL bases Lapack routines for dense mutable matrices Fast linear algebra routines Special routines for objects over RRR,CCC

Definition at line 25 of file mutable-matrix.cpp.

28{
29 if (n < 0)
30 {
31 ERROR("expected nonnegative integer");
32 return nullptr;
33 }
34 size_t nrows = static_cast<size_t>(n);
35 return internMutableMatrix(MutableMatrix::identity(R, nrows, is_dense));
36}
static MutableMatrix * identity(const Ring *R, size_t nrows, bool dense)
Definition mat.cpp:69
MutableMatrix * internMutableMatrix(MutableMatrix *G)
Definition finalize.cpp:200
const int ERROR
Definition m2-mem.cpp:55

References ERROR, MutableMatrix::identity(), and internMutableMatrix().