mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-23 01:59:38 +08:00
Matrix(int) constructor is only for vectors.
This commit is contained in:
parent
a587346b47
commit
344623e872
@ -88,7 +88,7 @@ class MatrixStorage<Scalar, Dynamic, ColsAtCompileTime>
|
|||||||
public:
|
public:
|
||||||
MatrixStorage(int dim) : m_rows(dim)
|
MatrixStorage(int dim) : m_rows(dim)
|
||||||
{
|
{
|
||||||
assert(m_rows > 0 && ColsAtCompileTime > 0);
|
assert(m_rows > 0 && ColsAtCompileTime == 1);
|
||||||
m_array = new Scalar[m_rows * ColsAtCompileTime];
|
m_array = new Scalar[m_rows * ColsAtCompileTime];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ class MatrixStorage<Scalar, RowsAtCompileTime, Dynamic>
|
|||||||
public:
|
public:
|
||||||
MatrixStorage(int dim) : m_cols(dim)
|
MatrixStorage(int dim) : m_cols(dim)
|
||||||
{
|
{
|
||||||
assert(m_cols > 0 && RowsAtCompileTime > 0);
|
assert(m_cols > 0 && RowsAtCompileTime == 1);
|
||||||
m_array = new Scalar[m_cols * RowsAtCompileTime];
|
m_array = new Scalar[m_cols * RowsAtCompileTime];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user