Commit 4bc2e4b4 authored by Max Lyon's avatar Max Lyon

fix more warnings

parent cf77e94f
Pipeline #3764 passed with stage
in 6 minutes and 35 seconds
......@@ -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< int > P;
int rank = spqr.factorize_system_eigen( A, Q, R, P);
int nullity(dimc-rank);
// setup permutation matrix
......
......@@ -150,8 +150,8 @@ bool solve_impl(
DEB_warning_if(!_problem->constant_gradient(), 1,
"CBCSolver received a problem with non-constant gradient!");
const int n_rows = _constraints.size(); // Constraints #
const int 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);
......
......@@ -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);
......
......@@ -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);
......
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