Commit 7bc23d9a authored by Jan Möbius's avatar Jan Möbius
Browse files

Deprecated UF_Long replaced by SuiteSparse_long

parent f001252e
Pipeline #484 passed with stage
......@@ -136,10 +136,10 @@ factorize_system_gmm( const GMM_MatrixT& _A, GMM_MatrixT2& _Q, GMM_MatrixT3& _R,
cholmod_print_sparse(AC, "AC", mp_cholmodCommon);
// 2. factorize A -> Q,R,P
UF_long econ = m;
SuiteSparse_long econ = m;
cholmod_sparse *Q, *R;
// UF_long *P = new UF_long[n];
UF_long *P;
SuiteSparse_long *P;
double rank = SuiteSparseQR<double>(ordering_, tolerance_, econ, AC, &Q, &R, &P, mp_cholmodCommon);
std::cerr << "factorization finished" << std::endl;
std::cerr << "rank: " << rank << std::endl;
......@@ -160,7 +160,7 @@ factorize_system_gmm( const GMM_MatrixT& _A, GMM_MatrixT2& _Q, GMM_MatrixT3& _R,
std::cerr << "free1 finished" << std::endl;
// TODO: alloc or free P ???
cholmod_free(n, sizeof(UF_long), P, mp_cholmodCommon);
cholmod_free(n, sizeof(SuiteSparse_long), P, mp_cholmodCommon);
std::cerr << "free2 finished" << std::endl;
......@@ -207,10 +207,10 @@ factorize_system_eigen( const Eigen_MatrixT& _A, Eigen_MatrixT& _Q, Eigen_Matrix
cholmod_print_sparse(AC, "AC", mp_cholmodCommon);
// 2. factorize A -> Q,R,P
UF_long econ = m;
SuiteSparse_long econ = m;
cholmod_sparse *Q, *R;
// UF_long *P = new UF_long[n];
UF_long *P;
SuiteSparse_long *P;
double rank = SuiteSparseQR<double>(ordering_, tolerance_, econ, AC, &Q, &R, &P, mp_cholmodCommon);
std::cerr << "factorization finished" << std::endl;
std::cerr << "rank: " << rank << std::endl;
......@@ -232,7 +232,7 @@ factorize_system_eigen( const Eigen_MatrixT& _A, Eigen_MatrixT& _Q, Eigen_Matrix
std::cerr << "free1 finished" << std::endl;
// TODO: alloc or free P ???
cholmod_free(n, sizeof(UF_long), P, mp_cholmodCommon);
cholmod_free(n, sizeof(SuiteSparse_long), P, mp_cholmodCommon);
std::cerr << "free2 finished" << std::endl;
......@@ -367,4 +367,4 @@ solve_system_eigen_min2norm( const Eigen_MatrixT& _A, const Eigen_MatrixT& _b, E
}
#endif//COMISO_SUITESPARSE_SPQR_AVAILABLE
\ No newline at end of file
#endif//COMISO_SUITESPARSE_SPQR_AVAILABLE
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment