mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 06:43:34 +08:00
Set Matrix's col amd row to single value (#113)
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user