@@ -483,7 +483,7 @@ void HighsSimplexAnalysis::dualSteepestEdgeWeightError(
483483
484484bool HighsSimplexAnalysis::predictEndDensity (const HighsInt tran_stage_type,
485485 const double start_density,
486- double & end_density) {
486+ double & end_density) const {
487487 return predictFromScatterData (tran_stage[tran_stage_type].rhs_density_ ,
488488 start_density, end_density);
489489}
@@ -607,15 +607,15 @@ void HighsSimplexAnalysis::simplexTimerStop(const HighsInt simplex_clock,
607607}
608608
609609bool HighsSimplexAnalysis::simplexTimerRunning (const HighsInt simplex_clock,
610- const HighsInt thread_id) {
610+ const HighsInt thread_id) const {
611611 if (!analyse_simplex_time) return false ;
612612 // assert(analyse_simplex_time);
613613 return thread_simplex_clocks[thread_id].timer_pointer_ ->clock_start
614614 [thread_simplex_clocks[thread_id].clock_ [simplex_clock]] < 0 ;
615615}
616616
617- HighsInt HighsSimplexAnalysis::simplexTimerNumCall (const HighsInt simplex_clock,
618- const HighsInt thread_id) {
617+ HighsInt HighsSimplexAnalysis::simplexTimerNumCall (
618+ const HighsInt simplex_clock, const HighsInt thread_id) const {
619619 if (!analyse_simplex_time) return -1 ;
620620 // assert(analyse_simplex_time);
621621 return thread_simplex_clocks[thread_id]
@@ -624,7 +624,7 @@ HighsInt HighsSimplexAnalysis::simplexTimerNumCall(const HighsInt simplex_clock,
624624}
625625
626626double HighsSimplexAnalysis::simplexTimerRead (const HighsInt simplex_clock,
627- const HighsInt thread_id) {
627+ const HighsInt thread_id) const {
628628 if (!analyse_simplex_time) return -1.0 ;
629629 // assert(analyse_simplex_time);
630630 return thread_simplex_clocks[thread_id].timer_pointer_ ->read (
@@ -1140,10 +1140,10 @@ void HighsSimplexAnalysis::summaryReport() {
11401140 }
11411141}
11421142
1143- void HighsSimplexAnalysis::summaryReportFactor () {
1143+ void HighsSimplexAnalysis::summaryReportFactor () const {
11441144 for (HighsInt tran_stage_type = 0 ; tran_stage_type < NUM_TRAN_STAGE_TYPE;
11451145 tran_stage_type++) {
1146- TranStageAnalysis& stage = tran_stage[tran_stage_type];
1146+ const TranStageAnalysis& stage = tran_stage[tran_stage_type];
11471147 // printScatterData(stage.name_, stage.rhs_density_);
11481148 printScatterDataRegressionComparison (stage.name_ , stage.rhs_density_ );
11491149 if (!stage.num_decision_ ) return ;
@@ -1163,7 +1163,7 @@ void HighsSimplexAnalysis::summaryReportFactor() {
11631163 }
11641164}
11651165
1166- void HighsSimplexAnalysis::reportSimplexTimer () {
1166+ void HighsSimplexAnalysis::reportSimplexTimer () const {
11671167 assert (analyse_simplex_time);
11681168 SimplexTimer simplex_timer;
11691169 simplex_timer.reportSimplexInnerClock (thread_simplex_clocks[0 ]);
@@ -1247,7 +1247,7 @@ void HighsSimplexAnalysis::updateInvertFormData(const HFactor& factor) {
12471247 if (report_kernel) printf (" \n " );
12481248}
12491249
1250- void HighsSimplexAnalysis::reportInvertFormData () {
1250+ void HighsSimplexAnalysis::reportInvertFormData () const {
12511251 assert (analyse_factor_data);
12521252 printf (" grep_kernel,%s,%s,%" HIGHSINT_FORMAT " ,%" HIGHSINT_FORMAT
12531253 " ,%" HIGHSINT_FORMAT " ," ,
@@ -1378,7 +1378,7 @@ void HighsSimplexAnalysis::reportOneDensity(const double density) {
13781378 }
13791379}
13801380
1381- void HighsSimplexAnalysis::printOneDensity (const double density) {
1381+ void HighsSimplexAnalysis::printOneDensity (const double density) const {
13821382 assert (analyse_simplex_summary_data || analyse_simplex_runtime_data);
13831383 const HighsInt log_10_density = intLog10 (density);
13841384 if (log_10_density > -99 ) {
@@ -1484,13 +1484,11 @@ void HighsSimplexAnalysis::reportRunTime(const bool header,
14841484#endif
14851485}
14861486
1487- HighsInt HighsSimplexAnalysis::intLog10 (const double v) {
1488- double log10V = v > 0 ? -2.0 * log (v) / log (10.0 ) : 99 ;
1489- HighsInt intLog10V = log10V;
1490- return intLog10V;
1487+ HighsInt HighsSimplexAnalysis::intLog10 (const double v) const {
1488+ return static_cast <HighsInt>(v > 0 ? -2.0 * log (v) / log (10.0 ) : 99 );
14911489}
14921490
1493- bool HighsSimplexAnalysis::dualAlgorithm () {
1491+ bool HighsSimplexAnalysis::dualAlgorithm () const {
14941492 return (simplex_strategy == kSimplexStrategyDual ||
14951493 simplex_strategy == kSimplexStrategyDualTasks ||
14961494 simplex_strategy == kSimplexStrategyDualMulti );
0 commit comments