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

◆ initialize()

template<typename CoeffRing>
void SMat< CoeffRing >::initialize ( size_t nrows,
size_t ncols,
sparsevec ** cols )

Definition at line 837 of file smat.hpp.

838{
839 nrows_ = nrows;
840 ncols_ = ncols;
842 if (cols == 0)
843 {
844 for (size_t i = 0; i < ncols; i++) columns_[i] = 0;
845 }
846 else
847 {
848 for (size_t i = 0; i < ncols; i++) columns_[i] = vec_copy(*cols++);
849 }
850}
size_t nrows_
Definition smat.hpp:232
sparsevec * vec_copy(const sparsevec *v) const
Definition smat.hpp:305
sparsevec ** columns_
Definition smat.hpp:234
size_t ncols_
Definition smat.hpp:233
Definition smat.hpp:43
#define newarray(T, len)
Definition newdelete.hpp:82

References columns_, ncols_, newarray, nrows_, and vec_copy().

Referenced by delete_columns(), insert_columns(), setFromSubmatrix(), setFromSubmatrix(), SMat(), and SMat().