@@ -74,35 +74,35 @@ void KktChStep::addChange(int type, HighsInt row, HighsInt col, double valC,
7474 case 171 : // new bounds from doubleton equation, retrieve old ones
7575 upd = rLowers.top ();
7676 rLowers.pop ();
77- for (size_t i = 0 ; i < upd. size (); i++ ) {
78- HighsInt ind = get<0 >(upd[i] );
79- RrowLower[ind] = get<1 >(upd[i] );
77+ for (const auto & bound : upd) {
78+ HighsInt ind = get<0 >(bound );
79+ RrowLower[ind] = get<1 >(bound );
8080 }
8181 upd = rUppers.top ();
8282 rUppers.pop ();
83- for (size_t i = 0 ; i < upd. size (); i++ ) {
84- HighsInt ind = get<0 >(upd[i] );
85- RrowUpper[ind] = get<1 >(upd[i] );
83+ for (const auto & bound : upd) {
84+ HighsInt ind = get<0 >(bound );
85+ RrowUpper[ind] = get<1 >(bound );
8686 }
8787 break ;
8888 case 1 : // row singleton
8989 upd = cLowers.top ();
9090 cLowers.pop ();
91- for (size_t i = 0 ; i < upd. size (); i++ ) {
92- HighsInt ind = get<0 >(upd[i] );
93- RcolLower[ind] = get<1 >(upd[i] );
91+ for (const auto & bound : upd) {
92+ HighsInt ind = get<0 >(bound );
93+ RcolLower[ind] = get<1 >(bound );
9494 }
9595 upd = cUppers.top ();
9696 cUppers.pop ();
97- for (size_t i = 0 ; i < upd. size (); i++ ) {
98- HighsInt ind = get<0 >(upd[i] );
99- RcolUpper[ind] = get<1 >(upd[i] );
97+ for (const auto & bound : upd) {
98+ HighsInt ind = get<0 >(bound );
99+ RcolUpper[ind] = get<1 >(bound );
100100 }
101101 upd = costs.top ();
102102 costs.pop ();
103- for (size_t i = 0 ; i < upd. size (); i++ ) {
104- HighsInt ind = get<0 >(upd[i] );
105- RcolCost[ind] = get<1 >(upd[i] );
103+ for (const auto & cost : upd) {
104+ HighsInt ind = get<0 >(cost );
105+ RcolCost[ind] = get<1 >(cost );
106106 }
107107 break ;
108108 case 2 : // each variable at forcing row: rowDual is cost here
@@ -111,146 +111,146 @@ void KktChStep::addChange(int type, HighsInt row, HighsInt col, double valC,
111111 case 22 : //
112112 upd = rLowers.top ();
113113 rLowers.pop ();
114- for (size_t i = 0 ; i < upd. size (); i++ ) {
115- HighsInt ind = get<0 >(upd[i] );
116- RrowLower[ind] = get<1 >(upd[i] );
114+ for (const auto & bound : upd) {
115+ HighsInt ind = get<0 >(bound );
116+ RrowLower[ind] = get<1 >(bound );
117117 }
118118 upd = rUppers.top ();
119119 rUppers.pop ();
120- for (size_t i = 0 ; i < upd. size (); i++ ) {
121- HighsInt ind = get<0 >(upd[i] );
122- RrowUpper[ind] = get<1 >(upd[i] );
120+ for (const auto & bound : upd) {
121+ HighsInt ind = get<0 >(bound );
122+ RrowUpper[ind] = get<1 >(bound );
123123 }
124124 break ;
125125 case 3 : // the row that is forcing
126126 if (valC != 0 ) {
127127 upd = rLowers.top ();
128128 rLowers.pop ();
129- for (size_t i = 0 ; i < upd. size (); i++ ) {
130- HighsInt ind = get<0 >(upd[i] );
131- RrowLower[ind] = get<1 >(upd[i] );
129+ for (const auto & bound : upd) {
130+ HighsInt ind = get<0 >(bound );
131+ RrowLower[ind] = get<1 >(bound );
132132 }
133133 upd = rUppers.top ();
134134 rUppers.pop ();
135- for (size_t i = 0 ; i < upd. size (); i++ ) {
136- HighsInt ind = get<0 >(upd[i] );
137- RrowUpper[ind] = get<1 >(upd[i] );
135+ for (const auto & bound : upd) {
136+ HighsInt ind = get<0 >(bound );
137+ RrowUpper[ind] = get<1 >(bound );
138138 }
139139 }
140140 break ;
141141 case 4 : // implied free column singleton (also from duplicate row)
142142 upd = costs.top ();
143143 costs.pop ();
144- for (size_t i = 0 ; i < upd. size (); i++ ) {
145- HighsInt ind = get<0 >(upd[i] );
146- RcolCost[ind] = get<1 >(upd[i] );
144+ for (const auto & cost : upd) {
145+ HighsInt ind = get<0 >(cost );
146+ RcolCost[ind] = get<1 >(cost );
147147 }
148148 break ;
149149 case 5 : // doubleton eq with singleton col
150150 upd = cLowers.top ();
151151 cLowers.pop ();
152- for (size_t i = 0 ; i < upd. size (); i++ ) {
153- HighsInt ind = get<0 >(upd[i] );
154- RcolLower[ind] = get<1 >(upd[i] );
152+ for (const auto & bound : upd) {
153+ HighsInt ind = get<0 >(bound );
154+ RcolLower[ind] = get<1 >(bound );
155155 }
156156 upd = cUppers.top ();
157157 cUppers.pop ();
158- for (size_t i = 0 ; i < upd. size (); i++ ) {
159- HighsInt ind = get<0 >(upd[i] );
160- RcolUpper[ind] = get<1 >(upd[i] );
158+ for (const auto & bound : upd) {
159+ HighsInt ind = get<0 >(bound );
160+ RcolUpper[ind] = get<1 >(bound );
161161 }
162162 upd = costs.top ();
163163 costs.pop ();
164- for (size_t i = 0 ; i < upd. size (); i++ ) {
165- HighsInt ind = get<0 >(upd[i] );
166- RcolCost[ind] = get<1 >(upd[i] );
164+ for (const auto & cost : upd) {
165+ HighsInt ind = get<0 >(cost );
166+ RcolCost[ind] = get<1 >(cost );
167167 }
168168 break ;
169169 case 17 : { // doubleton equation
170170 upd = cLowers.top ();
171171 cLowers.pop ();
172- for (size_t i = 0 ; i < upd. size (); i++ ) {
173- HighsInt ind = get<0 >(upd[i] );
174- RcolLower[ind] = get<1 >(upd[i] );
172+ for (const auto & bound : upd) {
173+ HighsInt ind = get<0 >(bound );
174+ RcolLower[ind] = get<1 >(bound );
175175 }
176176 upd = cUppers.top ();
177177 cUppers.pop ();
178- for (size_t i = 0 ; i < upd. size (); i++ ) {
179- HighsInt ind = get<0 >(upd[i] );
180- RcolUpper[ind] = get<1 >(upd[i] );
178+ for (const auto & bound : upd) {
179+ HighsInt ind = get<0 >(bound );
180+ RcolUpper[ind] = get<1 >(bound );
181181 }
182182 upd = costs.top ();
183183 costs.pop ();
184- for (size_t i = 0 ; i < upd. size (); i++ ) {
185- HighsInt ind = get<0 >(upd[i] );
186- RcolCost[ind] = get<1 >(upd[i] );
184+ for (const auto & cost : upd) {
185+ HighsInt ind = get<0 >(cost );
186+ RcolCost[ind] = get<1 >(cost );
187187 }
188188 break ;
189189 }
190190 case 6 : // empty column, dominated column or weakly dominated
191191 if (valC != 0 ) {
192192 upd = rLowers.top ();
193193 rLowers.pop ();
194- for (size_t i = 0 ; i < upd. size (); i++ ) {
195- HighsInt ind = get<0 >(upd[i] );
196- RrowLower[ind] = get<1 >(upd[i] );
194+ for (const auto & bound : upd) {
195+ HighsInt ind = get<0 >(bound );
196+ RrowLower[ind] = get<1 >(bound );
197197 }
198198 upd = rUppers.top ();
199199 rUppers.pop ();
200- for (size_t i = 0 ; i < upd. size (); i++ ) {
201- HighsInt ind = get<0 >(upd[i] );
202- RrowUpper[ind] = get<1 >(upd[i] );
200+ for (const auto & bound : upd) {
201+ HighsInt ind = get<0 >(bound );
202+ RrowUpper[ind] = get<1 >(bound );
203203 }
204204 }
205205 break ;
206206 case 7 : // fixed variable
207207 if (valC != 0 ) {
208208 upd = rLowers.top ();
209209 rLowers.pop ();
210- for (size_t i = 0 ; i < upd. size (); i++ ) {
211- HighsInt ind = get<0 >(upd[i] );
212- RrowLower[ind] = get<1 >(upd[i] );
210+ for (const auto & bound : upd) {
211+ HighsInt ind = get<0 >(bound );
212+ RrowLower[ind] = get<1 >(bound );
213213 }
214214 upd = rUppers.top ();
215215 rUppers.pop ();
216- for (size_t i = 0 ; i < upd. size (); i++ ) {
217- HighsInt ind = get<0 >(upd[i] );
218- RrowUpper[ind] = get<1 >(upd[i] );
216+ for (const auto & bound : upd) {
217+ HighsInt ind = get<0 >(bound );
218+ RrowUpper[ind] = get<1 >(bound );
219219 }
220220 }
221221 break ;
222222 case 11 : // empty row from duplicate rows
223223 upd = rLowers.top ();
224224 rLowers.pop ();
225- for (size_t i = 0 ; i < upd. size (); i++ ) {
226- HighsInt ind = get<0 >(upd[i] );
227- RrowLower[ind] = get<1 >(upd[i] );
225+ for (const auto & bound : upd) {
226+ HighsInt ind = get<0 >(bound );
227+ RrowLower[ind] = get<1 >(bound );
228228 }
229229 upd = rUppers.top ();
230230 rUppers.pop ();
231- for (size_t i = 0 ; i < upd. size (); i++ ) {
232- HighsInt ind = get<0 >(upd[i] );
233- RrowUpper[ind] = get<1 >(upd[i] );
231+ for (const auto & bound : upd) {
232+ HighsInt ind = get<0 >(bound );
233+ RrowUpper[ind] = get<1 >(bound );
234234 }
235235 break ;
236236 case 12 : // doubleton eq from duplicate rows;
237237 upd = cLowers.top ();
238238 cLowers.pop ();
239- for (size_t i = 0 ; i < upd. size (); i++ ) {
240- HighsInt ind = get<0 >(upd[i] );
241- RcolLower[ind] = get<1 >(upd[i] );
239+ for (const auto & bound : upd) {
240+ HighsInt ind = get<0 >(bound );
241+ RcolLower[ind] = get<1 >(bound );
242242 }
243243 upd = cUppers.top ();
244244 cUppers.pop ();
245- for (size_t i = 0 ; i < upd. size (); i++ ) {
246- HighsInt ind = get<0 >(upd[i] );
247- RcolUpper[ind] = get<1 >(upd[i] );
245+ for (const auto & bound : upd) {
246+ HighsInt ind = get<0 >(bound );
247+ RcolUpper[ind] = get<1 >(bound );
248248 }
249249 upd = costs.top ();
250250 costs.pop ();
251- for (size_t i = 0 ; i < upd. size (); i++ ) {
252- HighsInt ind = get<0 >(upd[i] );
253- RcolCost[ind] = get<1 >(upd[i] );
251+ for (const auto & cost : upd) {
252+ HighsInt ind = get<0 >(cost );
253+ RcolCost[ind] = get<1 >(cost );
254254 }
255255 break ;
256256 case 121 : //
0 commit comments