mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 12:19:12 +08:00
also optionnally initialize by zero after resizing
This commit is contained in:
parent
8132ee3908
commit
5266a78aca
@ -260,6 +260,7 @@ class Matrix
|
|||||||
&& (MaxColsAtCompileTime == Dynamic || MaxColsAtCompileTime >= cols)
|
&& (MaxColsAtCompileTime == Dynamic || MaxColsAtCompileTime >= cols)
|
||||||
&& (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols));
|
&& (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols));
|
||||||
m_storage.resize(rows * cols, rows, cols);
|
m_storage.resize(rows * cols, rows, cols);
|
||||||
|
EIGEN_INITIALIZE_BY_ZERO_IF_THAT_OPTION_IS_ENABLED
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Resizes \c *this to a vector of length \a size
|
/** Resizes \c *this to a vector of length \a size
|
||||||
@ -281,6 +282,7 @@ class Matrix
|
|||||||
m_storage.resize(size, 1, size);
|
m_storage.resize(size, 1, size);
|
||||||
else
|
else
|
||||||
m_storage.resize(size, size, 1);
|
m_storage.resize(size, size, 1);
|
||||||
|
EIGEN_INITIALIZE_BY_ZERO_IF_THAT_OPTION_IS_ENABLED
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Resizes the matrix, changing only the number of columns. For the parameter of type NoChange_t, just pass the special value \c NoChange
|
/** Resizes the matrix, changing only the number of columns. For the parameter of type NoChange_t, just pass the special value \c NoChange
|
||||||
|
Loading…
x
Reference in New Issue
Block a user