Skip to content
GitLab
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
4bc2e4b4
Commit
4bc2e4b4
authored
Dec 01, 2016
by
Max Lyon
Browse files
fix more warnings
parent
cf77e94f
Pipeline
#3764
passed with stage
in 6 minutes and 35 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Examples/small_sparseqr/main.cc
View file @
4bc2e4b4
...
...
@@ -86,7 +86,7 @@ int main(void)
std
::
cout
<<
"---------- 2) Sparse QR "
<<
std
::
endl
;
COMISO
::
SparseQRSolver
spqr
;
SpMatrix
Q
,
R
;
std
::
vector
<
size_
t
>
P
;
std
::
vector
<
in
t
>
P
;
int
rank
=
spqr
.
factorize_system_eigen
(
A
,
Q
,
R
,
P
);
int
nullity
(
dimc
-
rank
);
// setup permutation matrix
...
...
NSolver/CBCSolver.cc
View file @
4bc2e4b4
...
...
@@ -150,8 +150,8 @@ bool solve_impl(
DEB_warning_if
(
!
_problem
->
constant_gradient
(),
1
,
"CBCSolver received a problem with non-constant gradient!"
);
const
in
t
n_rows
=
_constraints
.
size
();
// Constraints #
const
in
t
n_cols
=
_problem
->
n_unknowns
();
// Unknowns #
const
size_
t
n_rows
=
_constraints
.
size
();
// Constraints #
const
size_
t
n_cols
=
_problem
->
n_unknowns
();
// Unknowns #
// expand the variable types from discrete mtrx array
std
::
vector
<
VariableType
>
var_type
(
n_cols
,
Real
);
...
...
Solver/Eigen_ToolsT.cc
View file @
4bc2e4b4
...
...
@@ -340,7 +340,7 @@ void cholmod_to_eigen( const cholmod_sparse& _AC, MatrixT& _A)
typedef
Eigen
::
Triplet
<
Scalar
>
Triplet
;
size_t
nzmax
(
_AC
.
nzmax
);
std
::
cerr
<<
__FUNCTION__
<<
" row "
<<
_AC
.
nrow
<<
" col "
<<
_AC
.
ncol
<<
" stype "
<<
_AC
.
stype
<<
std
::
endl
;
_A
=
MatrixT
(
_AC
.
nrow
,
_AC
.
ncol
);
_A
=
MatrixT
(
(
int
)
_AC
.
nrow
,
(
int
)
_AC
.
ncol
);
std
::
vector
<
Triplet
>
triplets
;
triplets
.
reserve
(
nzmax
);
...
...
Solver/SparseQRSolverT.cc
View file @
4bc2e4b4
...
...
@@ -211,7 +211,7 @@ factorize_system_eigen( const Eigen_MatrixT& _A, Eigen_MatrixT& _Q, Eigen_Matrix
cholmod_sparse
*
Q
,
*
R
;
// SuiteSparse_long *P = new SuiteSparse_long[n];
SuiteSparse_long
*
P
;
double
rank
=
SuiteSparseQR
<
double
>
(
ordering_
,
tolerance_
,
econ
,
AC
,
&
Q
,
&
R
,
&
P
,
mp_cholmodCommon
);
int
rank
=
(
int
)
SuiteSparseQR
<
double
>
(
ordering_
,
tolerance_
,
econ
,
AC
,
&
Q
,
&
R
,
&
P
,
mp_cholmodCommon
);
std
::
cerr
<<
"factorization finished"
<<
std
::
endl
;
std
::
cerr
<<
"rank: "
<<
rank
<<
std
::
endl
;
cholmod_print_sparse
(
Q
,
"Q"
,
mp_cholmodCommon
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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