@@ -103,26 +103,40 @@ struct Model
103103 // check that all matrices and vectors of qpmodel have the correct size
104104 // and that H and C have expected properties
105105 PROXSUITE_CHECK_ARGUMENT_SIZE (g.size (), dim, " g has not the expected size." )
106- PROXSUITE_CHECK_ARGUMENT_SIZE (b.size (), n_eq, " b has not the expected size." )
107- PROXSUITE_CHECK_ARGUMENT_SIZE (l.size (), n_in, " l has not the expected size." )
108- PROXSUITE_CHECK_ARGUMENT_SIZE (u.size (), n_in, " u has not the expected size." )
106+ PROXSUITE_CHECK_ARGUMENT_SIZE (
107+ b.size (), n_eq, " b has not the expected size." )
108+ PROXSUITE_CHECK_ARGUMENT_SIZE (
109+ l.size (), n_in, " l has not the expected size." )
110+ PROXSUITE_CHECK_ARGUMENT_SIZE (
111+ u.size (), n_in, " u has not the expected size." )
109112 if (box_constraints) {
110- PROXSUITE_CHECK_ARGUMENT_SIZE (u_box.size (), dim, " u_box has not the expected size" );
111- PROXSUITE_CHECK_ARGUMENT_SIZE (l_box.size (), dim, " l_box has not the expected size" );
113+ PROXSUITE_CHECK_ARGUMENT_SIZE (
114+ u_box.size (), dim, " u_box has not the expected size" );
115+ PROXSUITE_CHECK_ARGUMENT_SIZE (
116+ l_box.size (), dim, " l_box has not the expected size" );
112117 }
113118 if (H.size ()) {
114- PROXSUITE_CHECK_ARGUMENT_SIZE (H.rows (), dim, " H has not the expected number of rows." );
115- PROXSUITE_CHECK_ARGUMENT_SIZE (H.cols (), dim, " H has not the expected number of cols." );
116- PROXSUITE_THROW_PRETTY ((!H.isApprox (H.transpose (), 0.0 )), std::invalid_argument, " H is not symmetric." );
119+ PROXSUITE_CHECK_ARGUMENT_SIZE (
120+ H.rows (), dim, " H has not the expected number of rows." );
121+ PROXSUITE_CHECK_ARGUMENT_SIZE (
122+ H.cols (), dim, " H has not the expected number of cols." );
123+ PROXSUITE_THROW_PRETTY ((!H.isApprox (H.transpose (), 0.0 )),
124+ std::invalid_argument,
125+ " H is not symmetric." );
117126 }
118127 if (A.size ()) {
119- PROXSUITE_CHECK_ARGUMENT_SIZE (A.rows (), n_eq, " A has not the expected number of rows." );
120- PROXSUITE_CHECK_ARGUMENT_SIZE (A.cols (), dim, " A has not the expected number of cols." );
128+ PROXSUITE_CHECK_ARGUMENT_SIZE (
129+ A.rows (), n_eq, " A has not the expected number of rows." );
130+ PROXSUITE_CHECK_ARGUMENT_SIZE (
131+ A.cols (), dim, " A has not the expected number of cols." );
121132 }
122133 if (C.size ()) {
123- PROXSUITE_CHECK_ARGUMENT_SIZE (C.rows (), n_in, " C has not the expected number of rows." );
124- PROXSUITE_CHECK_ARGUMENT_SIZE (C.cols (), dim, " C has not the expected number of cols." );
125- PROXSUITE_THROW_PRETTY (C.isZero (), std::invalid_argument, " C is zero, while n_in != 0." );
134+ PROXSUITE_CHECK_ARGUMENT_SIZE (
135+ C.rows (), n_in, " C has not the expected number of rows." );
136+ PROXSUITE_CHECK_ARGUMENT_SIZE (
137+ C.cols (), dim, " C has not the expected number of cols." );
138+ PROXSUITE_THROW_PRETTY (
139+ C.isZero (), std::invalid_argument, " C is zero, while n_in != 0." );
126140 }
127141 return true ;
128142 }
0 commit comments