Skip to content

Commit

Permalink
WIP Step 8
Browse files Browse the repository at this point in the history
KWDataGridManager::SortAttributeParts: ajout de trace pour verifier la reproductibilite
  • Loading branch information
marcboulle committed Jan 15, 2024
1 parent ebc8f3c commit 8b1334a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Learning/KWDataPreparation/KWDataGrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3581,7 +3581,7 @@ KWDGValue* KWDGValueSet::AddValue(const Symbol& sValue)
// DDD
static int nCount = 0;
nCount++;
if (nCount == 560 or nCount == 561)
if (1720 <= nCount and nCount <= 1723)
cout << flush;
cout << "\tKWDGValueSet::AddValue\t" << nCount << "\t" << GetValueNumber() << "\t(" << sValue << ")\t"
<< BooleanToString(sValue == Symbol::GetStarValue()) << "\t" << BooleanToString(bIsDefaultPart) << endl;
Expand Down
7 changes: 7 additions & 0 deletions src/Learning/KWDataPreparation/KWDataGridManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2965,6 +2965,9 @@ void KWDataGridManager::SortAttributeParts(KWDGAttribute* sourceAttribute, KWDGA
oaAssociations.SetCompareFunction(KWSortableSymbolCompareValue);
oaAssociations.Sort();

// DDD
cout << "KWDataGridManager::SortAttributeParts" << endl;

// On range dans le tableau en sortie les parties sources, triees par groupe
// (en fait, par leur premiere valeur, ce qui est equivalent), et leur groupe associe
oaSortedSourceParts->SetSize(oaSourceParts.GetSize());
Expand All @@ -2983,6 +2986,10 @@ void KWDataGridManager::SortAttributeParts(KWDGAttribute* sourceAttribute, KWDGA
// Rangement dans les tableaux en sortie
oaSortedSourceParts->SetAt(n, sourcePart);
oaSortedGroupedParts->SetAt(n, groupedPart);

// DDD
cout << "\t" << sourcePart->GetValueSet()->GetObjectLabel() << "\t"
<< groupedPart->GetValueSet()->GetObjectLabel() << endl;
}

// Nettoyage du tableau d'indexation
Expand Down

0 comments on commit 8b1334a

Please sign in to comment.