@@ -146,7 +146,9 @@ namespace cmtool {
146146
147147 merge_switch.at (i) = false ;
148148
149+ std::cout << " Computing priority over " << _tmp_merged_clusters.size () << " input clusters" << std::endl;
149150 ComputePriority (_tmp_merged_clusters);
151+ std::cout << " there are " << _priority.size () << " pairs" << std::endl;
150152
151153 // Run merging algorithm
152154 RunMerge (algo_idx,_tmp_merged_clusters, merge_switch, bk);
@@ -227,11 +229,19 @@ namespace cmtool {
227229
228230 }
229231
232+ std::cout << " \033 [093m priority pairs : \033 [00m " << _priority.size () << std::endl;
233+
230234 //
231235 // Merging
232236 //
237+ int niter = 0 ;
238+ int nloop1 = 0 ;
239+ int nloop2 = 0 ;
240+ int ndiffpl = 0 ;
241+ int nflag = 0 ;
242+ int nmerge = 0 ;
233243
234- int niter = 0 ;
244+ std::cout << " pair-wise mode? " << _merge_algo_v[algo_idx]-> PairWiseMode () << std::endl ;
235245
236246 // which mode? pair-wise:
237247 if (_merge_algo_v[algo_idx]->PairWiseMode () == true ) {
@@ -240,24 +250,34 @@ namespace cmtool {
240250 for (auto citer1 = _priority.rbegin ();
241251 citer1 != _priority.rend ();
242252 ++citer1) {
243-
253+
254+ nloop1 += 1 ;
255+
244256 auto citer2 = citer1;
245257
246258 UChar_t plane1 = in_clusters.at ((*citer1).second )._plane ;
247259
248260 while (1 ) {
249261 citer2++;
250262 if (citer2 == _priority.rend ()) break ;
263+
264+ nloop2 += 1 ;
251265
252266 // Skip if not on the same plane
253267 UChar_t plane2 = in_clusters.at ((*citer2).second )._plane ;
254268 if (plane1 != plane2) continue ;
269+
270+ ndiffpl += 1 ;
255271
256272 // Skip if this combination is not meant to be compared
257273 if (!(merge_flag.at ((*citer2).second )) && !(merge_flag.at ((*citer1).second )) ) continue ;
274+
275+ nflag += 1 ;
258276
259277 // Skip if this combination is not allowed to merge
260278 if (!(book_keeper.MergeAllowed ((*citer1).second ,(*citer2).second ))) continue ;
279+
280+ nmerge += 1 ;
261281
262282 if (_debug_mode <= kPerMerging ){
263283
@@ -292,9 +312,14 @@ namespace cmtool {
292312
293313 } // end looping over clusters
294314
295- if (_debug_mode <= kPerIteration )
296- std::cout << " \033 [093m pair-wise comparisons : \033 [00m " << niter << std::endl;
297-
315+ if (_debug_mode <= kPerIteration ){
316+ std::cout << " \033 [093m pair-wise comparisons : \033 [00m " << niter << std::endl;
317+ std::cout << " \033 [093m loop1 iterations : \033 [00m " << nloop1 << std::endl;
318+ std::cout << " \033 [093m loop2 iterations : \033 [00m " << nloop2 << std::endl;
319+ std::cout << " \033 [093m ndiffplane : \033 [00m " << ndiffpl << std::endl;
320+ std::cout << " \033 [093m nflag : \033 [00m " << nflag << std::endl;
321+ std::cout << " \033 [093m nmerge : \033 [00m " << nmerge << std::endl;
322+ }
298323 }// if pair-wise mode
299324
300325
@@ -334,7 +359,7 @@ namespace cmtool {
334359
335360 }
336361
337- void CMergeManager::ReportAlgoChain () {
362+ void CMergeManager::ReportAlgoChain () {
338363
339364 std::cout << " \t\t " << std::endl;
340365 std::cout << " \t\t *****************" << std::endl;
0 commit comments