Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CoMISo
CoMISo
Commits
7bc23d9a
Commit
7bc23d9a
authored
Dec 18, 2015
by
Jan Möbius
Browse files
Deprecated UF_Long replaced by SuiteSparse_long
parent
f001252e
Pipeline
#484
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Solver/SparseQRSolverT.cc
View file @
7bc23d9a
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment