mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-20 11:54:27 +08:00
Fix AMD ordering when a column has only one off-diagonal non-zero (also fix bug #1045)
This commit is contained in:
parent
5ad7981f73
commit
ef2b54f422
@ -150,7 +150,7 @@ void minimum_degree_ordering(SparseMatrix<Scalar,ColMajor,StorageIndex>& C, Perm
|
|||||||
}
|
}
|
||||||
|
|
||||||
d = degree[i];
|
d = degree[i];
|
||||||
if(d == 1) /* node i is empty */
|
if(d == 1 && has_diag) /* node i is empty */
|
||||||
{
|
{
|
||||||
elen[i] = -2; /* element i is dead */
|
elen[i] = -2; /* element i is dead */
|
||||||
nel++;
|
nel++;
|
||||||
|
@ -41,8 +41,8 @@ template<typename T> void test_sparselu_T()
|
|||||||
SparseLU<SparseMatrix<T, ColMajor>, AMDOrdering<int> > sparselu_amd;
|
SparseLU<SparseMatrix<T, ColMajor>, AMDOrdering<int> > sparselu_amd;
|
||||||
SparseLU<SparseMatrix<T, ColMajor, long int>, NaturalOrdering<long int> > sparselu_natural;
|
SparseLU<SparseMatrix<T, ColMajor, long int>, NaturalOrdering<long int> > sparselu_natural;
|
||||||
|
|
||||||
check_sparse_square_solving(sparselu_colamd);
|
check_sparse_square_solving(sparselu_colamd, 300, 100000, true);
|
||||||
check_sparse_square_solving(sparselu_amd, 300, 2000, !true); // FIXME AMD ordering fails for structurally deficient matrices!
|
check_sparse_square_solving(sparselu_amd, 300, 10000, true);
|
||||||
check_sparse_square_solving(sparselu_natural, 300, 2000, true);
|
check_sparse_square_solving(sparselu_natural, 300, 2000, true);
|
||||||
|
|
||||||
check_sparse_square_abs_determinant(sparselu_colamd);
|
check_sparse_square_abs_determinant(sparselu_colamd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user