Commit 28d7a665 authored by Max Lyon's avatar Max Lyon

fix more warnings

parent 4bc2e4b4
Pipeline #3765 passed with stage
in 6 minutes and 34 seconds
......@@ -86,7 +86,7 @@ int main(void)
std::cout << "---------- 2) Sparse QR " << std::endl;
COMISO::SparseQRSolver spqr;
SpMatrix Q,R;
std::vector< int > 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;
}
}
......
......@@ -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 int n_cols = _problem->n_unknowns(); // Unknowns #
// expand the variable types from discrete mtrx array
std::vector<VariableType> var_type(n_cols, Real);
......
......@@ -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];
}
}
......
Markdown is supported
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