Set Matrix's col amd row to single value (#113)

This commit is contained in:
kritz
2019-12-05 18:16:14 +01:00
committed by Julian Kent
parent ef442fab92
commit 5cbcf6035a
4 changed files with 34 additions and 3 deletions
+9
View File
@@ -407,12 +407,21 @@ public:
slice<1,N>(i,0) = row_in.transpose();
}
void setRow(size_t i, Type val)
{
slice<1,N>(i,0) = val;
}
void setCol(size_t j, const Matrix<Type, M, 1> &column)
{
slice<M,1>(0,j) = column;
}
void setCol(size_t j, Type val)
{
slice<M,1>(0,j) = val;
}
void setZero()
{
memset(_data, 0, sizeof(_data));