@@ -39,7 +39,7 @@ void Scaling::LogMatrixNorms(const std::string& stage) {
3939 }
4040
4141 // --- Calculate and Log Column Norms (Infinity Norm) ---
42- std::cout << " Column Infinity Norms:" << std::endl ;
42+ highsLogUser (params_-> log_options_ , HighsLogType:: kInfo , " Column Infinity Norms:\n " ) ;
4343 for (HighsInt iCol = 0 ; iCol < lp.num_col_ ; ++iCol) {
4444 double max_abs_val = 0.0 ;
4545 for (HighsInt iEl = lp.a_matrix_ .start_ [iCol];
@@ -50,7 +50,7 @@ void Scaling::LogMatrixNorms(const std::string& stage) {
5050 }
5151
5252 // --- Calculate and Log Row Norms (Infinity Norm) ---
53- std::cout << " Row Infinity Norms:" << std::endl ;
53+ highsLogUser (params_-> log_options_ , HighsLogType:: kInfo , " Row Infinity Norms:\n " ) ;
5454 std::vector<double > row_max_abs_vals (lp.num_row_ , 0.0 );
5555 for (HighsInt iCol = 0 ; iCol < lp.num_col_ ; ++iCol) {
5656 for (HighsInt iEl = lp.a_matrix_ .start_ [iCol];
@@ -69,23 +69,23 @@ void Scaling::LogMatrixNorms(const std::string& stage) {
6969
7070void Scaling::scaleProblem () {
7171 if (params_->scaling_method == ScalingMethod::NONE) {
72- std::cout << " No scaling applied. " << std::endl ;
72+ highsLogUser (params_-> log_options_ , HighsLogType:: kInfo , " No scaling applied\n " ) ;
7373 return ;
7474 }
7575
76- std::cout << " Applying scaling method: "
77- << static_cast <int >(params_->scaling_method ) << std::endl ;
76+ highsLogUser (params_-> log_options_ , HighsLogType:: kInfo , " Applying scaling method: %d \n " ,
77+ static_cast <int >(params_->scaling_method )) ;
7878 if (params_->use_pc_scaling ) {
79- std::cout << " Applying Pock-Chambolle scaling..." << std::endl ;
79+ highsLogUser (params_-> log_options_ , HighsLogType:: kInfo , " Applying Pock-Chambolle scaling...\n " ) ;
8080 ApplyPockChambolleScaling ();
8181 }
8282 if (params_->use_ruiz_scaling ) {
83- std::cout << " Applying Ruiz scaling..." << std::endl ;
83+ highsLogUser (params_-> log_options_ , HighsLogType:: kInfo , " Applying Ruiz scaling...\n " ) ;
8484 ApplyRuizScaling ();
8585 }
8686 if (params_->use_l2_scaling ||
8787 params_->scaling_method == ScalingMethod::L2_NORM) {
88- std::cout << " Applying L2 norm scaling..." << std::endl ;
88+ highsLogUser (params_-> log_options_ , HighsLogType:: kInfo , " Applying L2 norm scaling...\n " ) ;
8989 ApplyL2Scaling ();
9090 }
9191
@@ -140,8 +140,7 @@ void Scaling::ApplyRuizScaling() {
140140 }
141141 }
142142 } else {
143- std::cerr << " Currently only support infinity norm for Ruiz scaling"
144- << std::endl;
143+ highsLogUser (params_->log_options_ , HighsLogType::kError , " Currently only support infinity norm for Ruiz scaling\n " );
145144 exit (1 );
146145 }
147146
@@ -160,7 +159,7 @@ void Scaling::ApplyRuizScaling() {
160159
161160void Scaling::ApplyPockChambolleScaling () {
162161 if (params_->pc_alpha < 0.0 || params_->pc_alpha > 2.0 ) {
163- std::cerr << " PC alpha should be in [0, 2]" << std::endl ;
162+ highsLogUser (params_-> log_options_ , HighsLogType:: kError , " PC alpha should be in [0, 2]\n " ) ;
164163 exit (1 );
165164 }
166165
0 commit comments