99namespace hipo {
1010
1111FactorHiGHSSolver::FactorHiGHSSolver (Options& options, const Model& model,
12- const Regularisation& regul, Info* info,
13- IpmData* record, const LogHighs& log)
12+ const Regularisation& regul, Info& info,
13+ IpmData& record, const LogHighs& log)
1414 : FH_(&log, options.block_size),
1515 S_{},
1616 regul_{regul},
@@ -264,7 +264,7 @@ Int FactorHiGHSSolver::factorAS(const HighsSparseMatrix& A,
264264 valLower[next++] = 0.0 ;
265265 ptrLower[nA + i + 1 ] = ptrLower[nA + i] + 1 ;
266266 }
267- if ( info_) info_-> matrix_time += clock.stop ();
267+ info_. matrix_time += clock.stop ();
268268
269269 // set static regularisation, since it may have changed
270270 FH_.setRegularisation (regul_.primal , regul_.dual );
@@ -273,10 +273,8 @@ Int FactorHiGHSSolver::factorAS(const HighsSparseMatrix& A,
273273 clock.start ();
274274 if (FH_.factorise (S_, rowsLower, ptrLower, valLower))
275275 return kStatusErrorFactorise ;
276- if (info_) {
277- info_->factor_time += clock.stop ();
278- info_->factor_number ++;
279- }
276+ info_.factor_time += clock.stop ();
277+ info_.factor_number ++;
280278
281279 this ->valid_ = true ;
282280 return kStatusOk ;
@@ -291,7 +289,7 @@ Int FactorHiGHSSolver::factorNE(const HighsSparseMatrix& A,
291289
292290 // build matrix
293291 Int status = buildNEvalues (A, scaling);
294- if ( info_) info_-> matrix_time += clock.stop ();
292+ info_. matrix_time += clock.stop ();
295293
296294 // set static regularisation, since it may have changed
297295 FH_.setRegularisation (regul_.primal , regul_.dual );
@@ -303,10 +301,9 @@ Int FactorHiGHSSolver::factorNE(const HighsSparseMatrix& A,
303301 std::vector<Int> ptrNE (ptrNE_);
304302 std::vector<Int> rowsNE (rowsNE_);
305303 if (FH_.factorise (S_, rowsNE, ptrNE, valNE_)) return kStatusErrorFactorise ;
306- if (info_) {
307- info_->factor_time += clock.stop ();
308- info_->factor_number ++;
309- }
304+
305+ info_.factor_time += clock.stop ();
306+ info_.factor_number ++;
310307
311308 this ->valid_ = true ;
312309 return kStatusOk ;
@@ -322,13 +319,11 @@ Int FactorHiGHSSolver::solveNE(const std::vector<double>& rhs,
322319
323320 Clock clock;
324321 if (FH_.solve (lhs)) return kStatusErrorSolve ;
325- if (info_) {
326- info_->solve_time += clock.stop ();
327- info_->solve_number ++;
328- }
329- if (data_) {
330- data_->back ().num_solves ++;
331- }
322+
323+ info_.solve_time += clock.stop ();
324+ info_.solve_number ++;
325+
326+ data_.back ().num_solves ++;
332327
333328 return kStatusOk ;
334329}
@@ -349,13 +344,11 @@ Int FactorHiGHSSolver::solveAS(const std::vector<double>& rhs_x,
349344
350345 Clock clock;
351346 if (FH_.solve (rhs)) return kStatusErrorSolve ;
352- if (info_) {
353- info_->solve_time += clock.stop ();
354- info_->solve_number ++;
355- }
356- if (data_) {
357- data_->back ().num_solves ++;
358- }
347+
348+ info_.solve_time += clock.stop ();
349+ info_.solve_number ++;
350+
351+ data_.back ().num_solves ++;
359352
360353 // split lhs
361354 lhs_x = std::vector<double >(rhs.begin (), rhs.begin () + n);
@@ -477,7 +470,7 @@ Int FactorHiGHSSolver::analyseAS(Symbolic& S) {
477470 std::vector<Int> rowsLower;
478471 if (Int status = getASstructure (model_.A (), ptrLower, rowsLower))
479472 return status;
480- if ( info_) info_-> matrix_structure_time = clock.stop ();
473+ info_. matrix_structure_time = clock.stop ();
481474
482475 // create vector of signs of pivots
483476 std::vector<Int> pivot_signs (model_.A ().num_col_ + model_.A ().num_row_ , -1 );
@@ -509,7 +502,7 @@ Int FactorHiGHSSolver::analyseNE(Symbolic& S, Int64 nz_limit) {
509502
510503 Clock clock;
511504 if (Int status = buildNEstructure (model_.A (), nz_limit)) return status;
512- if ( info_) info_-> matrix_structure_time = clock.stop ();
505+ info_. matrix_structure_time = clock.stop ();
513506
514507 // create vector of signs of pivots
515508 std::vector<Int> pivot_signs (model_.A ().num_row_ , 1 );
0 commit comments