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
28d7a665
Commit
28d7a665
authored
Dec 01, 2016
by
Max Lyon
Browse files
fix more warnings
parent
4bc2e4b4
Pipeline
#3765
passed with stage
in 6 minutes and 34 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Examples/small_sparseqr/main.cc
View file @
28d7a665
...
...
@@ -86,7 +86,7 @@ int main(void)
std
::
cout
<<
"---------- 2) Sparse QR "
<<
std
::
endl
;
COMISO
::
SparseQRSolver
spqr
;
SpMatrix
Q
,
R
;
std
::
vector
<
in
t
>
P
;
std
::
vector
<
size_
t
>
P
;
int
rank
=
spqr
.
factorize_system_eigen
(
A
,
Q
,
R
,
P
);
int
nullity
(
dimc
-
rank
);
// setup permutation matrix
...
...
@@ -95,7 +95,7 @@ int main(void)
{
for
(
size_t
i
=
0
;
i
<
P
.
size
();
++
i
)
{
Pm
.
coeffRef
(
i
,
P
[
i
])
=
1
;
Pm
.
coeffRef
(
i
,
(
int
)
P
[
i
])
=
1
;
}
}
...
...
NSolver/CBCSolver.cc
View file @
28d7a665
...
...
@@ -151,7 +151,7 @@ bool solve_impl(
"CBCSolver received a problem with non-constant gradient!"
);
const
size_t
n_rows
=
_constraints
.
size
();
// Constraints #
const
size_
t
n_cols
=
_problem
->
n_unknowns
();
// Unknowns #
const
in
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 @
28d7a665
...
...
@@ -365,7 +365,7 @@ void cholmod_to_eigen( const cholmod_sparse& _AC, MatrixT& _A)
for
(
SuiteSparse_long
i
=
0
;
i
<
(
SuiteSparse_long
)
_AC
.
ncol
;
++
i
)
for
(
SuiteSparse_long
j
=
P
[
i
];
j
<
P
[
i
+
1
];
++
j
)
//_A( I[j], i) += X[j]; // += really needed?
triplets
.
push_back
(
Triplet
(
I
[
j
],
i
,
X
[
j
]));
triplets
.
push_back
(
Triplet
(
(
int
)
I
[
j
],
(
int
)
i
,
X
[
j
]));
}
else
{
...
...
@@ -374,7 +374,7 @@ void cholmod_to_eigen( const cholmod_sparse& _AC, MatrixT& _A)
for
(
int
i
=
0
;
i
<
(
int
)
_AC
.
ncol
;
++
i
)
for
(
int
j
=
P
[
i
];
j
<
P
[
i
+
1
];
++
j
)
triplets
.
push_back
(
Triplet
(
I
[
j
],
i
,
X
[
j
]));
triplets
.
push_back
(
Triplet
(
(
int
)
I
[
j
],
(
int
)
i
,
X
[
j
]));
//_A( I[j], i) += X[j];
}
...
...
@@ -391,11 +391,11 @@ void cholmod_to_eigen( const cholmod_sparse& _AC, MatrixT& _A)
for
(
SuiteSparse_long
j
=
P
[
i
];
j
<
P
[
i
+
1
];
++
j
)
{
//_A(I[j], i) += X[j];
triplets
.
push_back
(
Triplet
(
I
[
j
],
i
,
X
[
j
]));
triplets
.
push_back
(
Triplet
(
(
int
)
I
[
j
],
(
int
)
i
,
X
[
j
]));
// add up symmetric part
if
(
I
[
j
]
!=
i
)
triplets
.
push_back
(
Triplet
(
i
,
I
[
j
],
X
[
j
]));
triplets
.
push_back
(
Triplet
(
(
int
)
i
,
(
int
)
I
[
j
],
X
[
j
]));
//_A(i,I[j]) += X[j];
}
}
...
...
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