@@ -84,35 +84,36 @@ void GraphicsImpl::debugForNesterovPlace(
8484 chart_->setYAxisFormats ({" %.2e" , " %.2f" });
8585 chart_->setYAxisMin ({std::nullopt , 0 });
8686
87- // Useful for debugging multiple NesterovBase: Density penalty and PhiCoef
88- if (logger_->debugCheck (utl::GPL, " penaltyPlot" , 1 )) {
89- if (!nbVec_.empty ()) {
90- std::vector<std::string> series_names;
91- series_names.reserve (nbVec_.size ());
92- for (size_t i = 0 ; i < nbVec_.size (); ++i) {
93- std::string name;
94- if (nbVec_[i] && nbVec_[i]->getPb () && nbVec_[i]->getPb ()->group ()) {
95- name = fmt::format (
96- " nb[{}] {}" , i, nbVec_[i]->getPb ()->group ()->getName ());
97- } else {
98- name = fmt::format (" nb[{}]" , i);
87+ // Useful for debugging multiple NesterovBase: Density penalty and PhiCoef
88+ if (logger_->debugCheck (utl::GPL, " penaltyPlot" , 1 )) {
89+ if (!nbVec_.empty ()) {
90+ std::vector<std::string> series_names;
91+ series_names.reserve (nbVec_.size ());
92+ for (size_t i = 0 ; i < nbVec_.size (); ++i) {
93+ std::string name;
94+ if (nbVec_[i] && nbVec_[i]->getPb () && nbVec_[i]->getPb ()->group ()) {
95+ name = fmt::format (
96+ " nb[{}] {}" , i, nbVec_[i]->getPb ()->group ()->getName ());
97+ } else {
98+ name = fmt::format (" nb[{}]" , i);
99+ }
100+ series_names.push_back (name);
99101 }
100- series_names.push_back (name);
102+ density_chart_ = gui::Gui::get ()->addChart (
103+ " GPL Density Penalty" , " Iteration" , series_names);
104+ density_chart_->setXAxisFormat (" %d" );
105+ std::vector<std::string> y_formats (nbVec_.size (), " %.3f" );
106+ density_chart_->setYAxisFormats (y_formats);
107+ std::vector<std::optional<double >> y_mins (nbVec_.size (), 0.0 );
108+ density_chart_->setYAxisMin (y_mins);
109+
110+ phi_chart_ = gui::Gui::get ()->addChart (
111+ " GPL PhiCoef" , " Iteration" , series_names);
112+ phi_chart_->setXAxisFormat (" %d" );
113+ phi_chart_->setYAxisFormats (y_formats);
114+ phi_chart_->setYAxisMin (y_mins);
101115 }
102- density_chart_
103- = gui::Gui::get ()->addChart (" GPL Density Penalty" , " Iteration" , series_names);
104- density_chart_->setXAxisFormat (" %d" );
105- std::vector<std::string> y_formats (nbVec_.size (), " %.3f" );
106- density_chart_->setYAxisFormats (y_formats);
107- std::vector<std::optional<double >> y_mins (nbVec_.size (), 0.0 );
108- density_chart_->setYAxisMin (y_mins);
109-
110- phi_chart_ = gui::Gui::get ()->addChart (" GPL PhiCoef" , " Iteration" , series_names);
111- phi_chart_->setXAxisFormat (" %d" );
112- phi_chart_->setYAxisFormats (y_formats);
113- phi_chart_->setYAxisMin (y_mins);
114116 }
115- }
116117
117118 initHeatmap ();
118119 if (inst) {
@@ -252,7 +253,7 @@ void GraphicsImpl::drawForce(gui::Painter& painter)
252253
253254void GraphicsImpl::drawCells (const std::vector<GCellHandle>& cells,
254255 gui::Painter& painter,
255- size_t nb_index)
256+ size_t nb_index)
256257{
257258 for (const auto & handle : cells) {
258259 const GCell* gCell = handle;
@@ -268,8 +269,9 @@ void GraphicsImpl::drawCells(const std::vector<GCell*>& cells,
268269 }
269270}
270271
271-
272- void GraphicsImpl::drawSingleGCell (const GCell* gCell , gui::Painter& painter, size_t nb_index)
272+ void GraphicsImpl::drawSingleGCell (const GCell* gCell ,
273+ gui::Painter& painter,
274+ size_t nb_index)
273275{
274276 const int gcx = gCell ->dCx ();
275277 const int gcy = gCell ->dCy ();
0 commit comments