我正在研究一段代码,我必须使用Eigen求解线性代数系统(A x = B)。我已经检查过矩阵的大小是否正确。 执行此代码后:
SparseQR<SparseMatrix<double>, COLAMDOrdering<int>> ΜΥsolver;
m_LeftMatrix.makeCompressed();
ΜΥsolver.compute(m_LeftMatrix);
if (ΜΥsolver.info() != Success) {
cout << "!!! decomposition failed !!!\n";
return;
}
SparseMatrix<double> tmp_v_x(SIZE, 1);
tmp_v_x = ΜΥsolver.solve(m_RightMatrix);
if (MYsolver.info() != Success) {
cout << "!!! solving failed !!!\n";
return;
}
我收到以下错误消息(7次):
Assertion failed: rows == this->rows() && cols == this->cols() && "DenseBase::resize() does not actually allow to resize.", file c:\users\Nikos\downloads\eigen\eigen\src\core\densebase.h, line 257
以下弹出窗口3次!
有人知道什么是错的!?我当然不会改变矢量的大小。为什么会这样?