Skip to content

Commit 9712fe9

Browse files
committed
occurrence spelling corrected
1 parent 5e41891 commit 9712fe9

File tree

5 files changed

+39
-39
lines changed

5 files changed

+39
-39
lines changed

core/base/common/DataTypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ namespace ttk {
6565

6666
// default name for SeparatrixStability
6767

68-
const char SeparatrixStabilityOccurenceCount[] = "Occurence";
68+
const char SeparatrixStabilityOccurrenceCount[] = "Occurrence";
6969
const char SeparatrixStabilityIsomorphismClassId[] = "IsomorphismClassId";
7070
const char SeparatrixStabilityMatchingIdName[] = "MatchingIdInBlock";
7171
const char SeparatrixStabilityMatchingIdSeparatrixName[] = "SeparatrixMatchingIdInBlock";

core/base/separatrixStability/SeparatrixStability.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ int ttk::SeparatrixStability::buildMatchingsWithOtherBlocks(
9191
return 1;
9292
}
9393

94-
int ttk::SeparatrixStability::buildOccurenceArraysFull(
94+
int ttk::SeparatrixStability::buildOccurrenceArraysFull(
9595
const std::vector<GraphMatrixFull> &adjacencyMatrices,
9696
const int &n_separatrices,
9797
const std::vector<std::vector<std::array<double, 3>>> &coordsSource,
9898
const std::vector<std::vector<std::array<double, 3>>> &coordsDestination,
9999
const std::vector<std::vector<double>> &scalarsSource,
100100
const std::vector<std::vector<double>> &scalarsDestination,
101101
const int &block_id,
102-
std::vector<int> &edgeOccurences,
102+
std::vector<int> &edgeOccurrences,
103103
std::vector<bool> &isIsomorphicWith,
104104
std::vector<std::vector<int>> &matchingArraySource,
105105
std::vector<std::vector<int>> &matchingArrayDestination,
@@ -119,7 +119,7 @@ int ttk::SeparatrixStability::buildOccurenceArraysFull(
119119
matchingArrayDestination[k].resize(adjacencyMatrices[k][0].size(),-2);
120120
}
121121

122-
edgeOccurences.resize(n_separatrices, 1);
122+
edgeOccurrences.resize(n_separatrices, 1);
123123

124124
std::vector<std::vector<MatchingType>> matchingsSource(n_blocks - 1);
125125
std::vector<std::vector<MatchingType>> matchingsDestination(n_blocks - 1);
@@ -186,7 +186,7 @@ int ttk::SeparatrixStability::buildOccurenceArraysFull(
186186
[thisBlockDestinationId];
187187
int separatriceIdInOtherBlock = adjacencyMatrices[k][otherBlockSourceId]
188188
[otherBlockDestinationId];
189-
edgeOccurences[separatriceId]++;
189+
edgeOccurrences[separatriceId]++;
190190
matchingArraySeparatrix[k][separatriceIdInOtherBlock]= separatriceId;
191191
}else if((adjacencyMatrices[block_id][thisBlockSourceId]
192192
[thisBlockDestinationId]
@@ -238,13 +238,13 @@ void ttk::SeparatrixStability::computeGraphMinor(
238238
}
239239
}
240240

241-
int ttk::SeparatrixStability::buildOccurenceArraysMinor(
241+
int ttk::SeparatrixStability::buildOccurrenceArraysMinor(
242242
const std::vector<GraphMatrixFull> &adjacencyMatricesFull,
243243
const int &n_separatrices,
244244
const std::vector<std::vector<std::array<double, 3>>> &coords,
245245
const std::vector<std::vector<double>> &scalars,
246246
const int &block_id,
247-
std::vector<int> &edgeOccurences,
247+
std::vector<int> &edgeOccurrences,
248248
std::vector<bool> &isIsomorphicWith,
249249
std::vector<std::vector<int>> &matchingArray,
250250
std::vector<std::vector<int>> &matchingArraySeparatrix) {
@@ -270,14 +270,14 @@ int ttk::SeparatrixStability::buildOccurenceArraysMinor(
270270
matchingArray[block_id][i]=i;
271271
}
272272

273-
edgeOccurences.resize(n_separatrices);
273+
edgeOccurrences.resize(n_separatrices);
274274

275275
for(int i = 0; i < n_pointsThisBlock; i++) {
276276
for(int j = 0; j < n_pointsThisBlock; j++) {
277277
if(!adjacencyMatricesMinor[block_id][i][j].empty()) {;
278278
for(auto edge : adjacencyMatricesMinor[block_id][i][j]) {
279-
edgeOccurences[edge.first] = 1;
280-
edgeOccurences[edge.second] = 1;
279+
edgeOccurrences[edge.first] = 1;
280+
edgeOccurrences[edge.second] = 1;
281281
}
282282
}
283283
}
@@ -344,8 +344,8 @@ int ttk::SeparatrixStability::buildOccurenceArraysMinor(
344344
for(auto edge : adjacencyMatricesMinor[block_id][thisBlockVertex1]
345345
[thisBlockVertex2]) {
346346
std::pair<int, int> edgeInOtherBlock = adjacencyMatricesMinor[k][otherBlockVertex1][otherBlockVertex2][0];
347-
edgeOccurences[edge.first] += existsInOtherBlock;
348-
edgeOccurences[edge.second] += existsInOtherBlock;
347+
edgeOccurrences[edge.first] += existsInOtherBlock;
348+
edgeOccurrences[edge.second] += existsInOtherBlock;
349349
matchingArraySeparatrix[k][edgeInOtherBlock.first]=matchingArraySeparatrix[block_id][edge.first];
350350
matchingArraySeparatrix[k][edgeInOtherBlock.second]=matchingArraySeparatrix[block_id][edge.second];
351351
}
@@ -360,15 +360,15 @@ int ttk::SeparatrixStability::buildOccurenceArraysMinor(
360360
return 1;
361361
}
362362

363-
int ttk::SeparatrixStability::buildOccurenceArrays(
363+
int ttk::SeparatrixStability::buildOccurrenceArrays(
364364
const std::vector<GraphMatrixFull> &adjacencyMatrices,
365365
const std::vector<int> &separatrixCountForEachBlock ,
366366
const std::vector<std::vector<std::array<double, 3>>> &coordsSource,
367367
const std::vector<std::vector<std::array<double, 3>>> &coordsDestination,
368368
const std::vector<std::vector<double>> &scalarsSource,
369369
const std::vector<std::vector<double>> &scalarsDestination,
370370
const bool &mergeEdgesOnSaddles,
371-
std::vector<std::vector<int>> &edgesOccurencesForEachBlock,
371+
std::vector<std::vector<int>> &edgesOccurrencesForEachBlock,
372372
std::vector<std::vector<bool>> &isomorphismForEachBlock,
373373
std::vector<std::vector<std::vector<int>>> &matchingArrayForEachBlockSource,
374374
std::vector<std::vector<std::vector<int>>> &matchingArrayForEachBlockDestination,
@@ -388,16 +388,16 @@ int ttk::SeparatrixStability::buildOccurenceArrays(
388388
#endif // TTK_ENABLE_OPENMP
389389
for(int i = 0; i < n_blocks; i++) {
390390
if(!mergeEdgesOnSaddles) {
391-
status = this->buildOccurenceArraysFull(
391+
status = this->buildOccurrenceArraysFull(
392392
adjacencyMatrices, separatrixCountForEachBlock[i], coordsSource,
393-
coordsDestination, scalarsSource, scalarsDestination, i, edgesOccurencesForEachBlock[i], isomorphismForEachBlock[i],
393+
coordsDestination, scalarsSource, scalarsDestination, i, edgesOccurrencesForEachBlock[i], isomorphismForEachBlock[i],
394394
matchingArrayForEachBlockSource[i],
395395
matchingArrayForEachBlockDestination[i],
396396
matchingArraySeparatrixForEachBlock[i]);
397397
} else {
398-
status = this->buildOccurenceArraysMinor(
398+
status = this->buildOccurrenceArraysMinor(
399399
adjacencyMatrices, separatrixCountForEachBlock[i],
400-
coordsDestination, scalarsDestination, i, edgesOccurencesForEachBlock[i], isomorphismForEachBlock[i],
400+
coordsDestination, scalarsDestination, i, edgesOccurrencesForEachBlock[i], isomorphismForEachBlock[i],
401401
matchingArrayForEachBlockDestination[i],
402402
matchingArraySeparatrixForEachBlock[i]);
403403
}

core/base/separatrixStability/SeparatrixStability.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ namespace ttk {
1919

2020
SeparatrixStability();
2121

22-
int buildOccurenceArrays(
22+
int buildOccurrenceArrays(
2323
const std::vector<GraphMatrixFull> &adjacencyMatrices,
2424
const std::vector<int> &separatrixCountForEachBlock ,
2525
const std::vector<std::vector<std::array<double, 3>>> &coordsSource,
2626
const std::vector<std::vector<std::array<double, 3>>> &coordsDestination,
2727
const std::vector<std::vector<double>> &scalarsSource,
2828
const std::vector<std::vector<double>> &scalarsDestination,
2929
const bool &mergeEdgesOnSaddles,
30-
std::vector<std::vector<int>> &edgesOccurencesForEachBlock,
30+
std::vector<std::vector<int>> &edgesOccurrencesForEachBlock,
3131
std::vector<std::vector<bool>> &isomorphismForEachBlock,
3232
std::vector<std::vector<std::vector<int>>> &matchingArrayForEachBlockSource,
3333
std::vector<std::vector<std::vector<int>>> &matchingArrayForEachBlockDestination,
@@ -65,26 +65,26 @@ namespace ttk {
6565
std::vector<ttk::MatchingType> &matching);
6666

6767

68-
int buildOccurenceArraysMinor(
68+
int buildOccurrenceArraysMinor(
6969
const std::vector<GraphMatrixFull> &adjacencyMatrices,
7070
const int &n_separatrices,
7171
const std::vector<std::vector<std::array<double, 3>>> &coords,
7272
const std::vector<std::vector<double>> &scalars,
7373
const int &block_id,
74-
std::vector<int> &edgeOccurences,
74+
std::vector<int> &edgeOccurrences,
7575
std::vector<bool> &isIsomorphicWith,
7676
std::vector<std::vector<int>> &matchingArray,
7777
std::vector<std::vector<int>> &matchingArraySeparatrix);
7878

79-
int buildOccurenceArraysFull(
79+
int buildOccurrenceArraysFull(
8080
const std::vector<GraphMatrixFull> &adjacencyMatrices,
8181
const int &n_separatrices,
8282
const std::vector<std::vector<std::array<double, 3>>> &coordsSource,
8383
const std::vector<std::vector<std::array<double, 3>>> &coordsDestination,
8484
const std::vector<std::vector<double>> &scalarsSource,
8585
const std::vector<std::vector<double>> &scalarsDestination,
8686
const int &block_id,
87-
std::vector<int> &edgesOccurences,
87+
std::vector<int> &edgesOccurrences,
8888
std::vector<bool> &isIsomorphicWith,
8989
std::vector<std::vector<int>> &matchingArraySource,
9090
std::vector<std::vector<int>> &matchingArrayDestination,

core/vtk/ttkSeparatrixStability/ttkSeparatrixStability.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ int ttkSeparatrixStability::execute(
245245
std::vector<std::vector<double>> scalarsDestination(n_blocks);
246246
std::vector<std::vector<double>> scalarsSource(n_blocks);
247247
std::vector<int> separatrixCountForEachBlock(n_blocks);
248-
std::vector<std::vector<int>> edgeOccurenceForEachBlock(n_blocks);
248+
std::vector<std::vector<int>> edgeOccurrenceForEachBlock(n_blocks);
249249
std::vector<std::vector<bool>> isomorphismsForEachBlock(n_blocks);
250250
std::vector<std::vector<std::vector<int>>> matchingArrayForEachBlockSource(n_blocks);
251251
std::vector<std::vector<std::vector<int>>> matchingArrayForEachBlockDestination(n_blocks);
@@ -282,14 +282,14 @@ int ttkSeparatrixStability::execute(
282282
}
283283

284284

285-
status = this->buildOccurenceArrays(adjacencyMatricesFull,
285+
status = this->buildOccurrenceArrays(adjacencyMatricesFull,
286286
separatrixCountForEachBlock,
287287
coordsSource,
288288
coordsDestination,
289289
scalarsSource,
290290
scalarsDestination,
291291
MergeEdgesOnSaddles,
292-
edgeOccurenceForEachBlock,
292+
edgeOccurrenceForEachBlock,
293293
isomorphismsForEachBlock,
294294
matchingArrayForEachBlockSource,
295295
matchingArrayForEachBlockDestination,
@@ -331,9 +331,9 @@ int ttkSeparatrixStability::execute(
331331
ttkSimplexIdTypeArray *separatrixIds = ttkSimplexIdTypeArray::SafeDownCast(
332332
block->GetCellData()->GetArray(ttk::MorseSmaleSeparatrixIdName));
333333

334-
vtkNew<vtkFloatArray> occurenceCount;
335-
occurenceCount->SetNumberOfComponents(1);
336-
occurenceCount->SetName(ttk::SeparatrixStabilityOccurenceCount);
334+
vtkNew<vtkFloatArray> occurrenceCount;
335+
occurrenceCount->SetNumberOfComponents(1);
336+
occurrenceCount->SetName(ttk::SeparatrixStabilityOccurrenceCount);
337337

338338
vtkNew<vtkIntArray> isomorphismClassId;
339339
isomorphismClassId->SetNumberOfComponents(1);
@@ -343,21 +343,21 @@ int ttkSeparatrixStability::execute(
343343
int currentSeparatrixId = separatrixIds->GetValue(currentCellId);
344344
int separatrixCount = 0;
345345
float newValue
346-
= (float)edgeOccurenceForEachBlock[i][separatrixCount] / n_blocks;
346+
= (float)edgeOccurrenceForEachBlock[i][separatrixCount] / n_blocks;
347347

348-
occurenceCount->InsertNextValue(newValue);
348+
occurrenceCount->InsertNextValue(newValue);
349349

350350
for(int j = 1; j < cellNumber; j++) {
351351
if(separatrixIds->GetValue(j) != currentSeparatrixId) {
352352
currentSeparatrixId = separatrixIds->GetValue(j);
353353
separatrixCount++;
354354
newValue
355-
= (float)edgeOccurenceForEachBlock[i][separatrixCount] / n_blocks;
355+
= (float)edgeOccurrenceForEachBlock[i][separatrixCount] / n_blocks;
356356
}
357-
occurenceCount->InsertNextValue(newValue);
357+
occurrenceCount->InsertNextValue(newValue);
358358
}
359359

360-
block->GetCellData()->AddArray(occurenceCount);
360+
block->GetCellData()->AddArray(occurrenceCount);
361361

362362
isomorphismClassId->InsertNextValue(classId[i]);
363363

@@ -450,7 +450,7 @@ int ttkSeparatrixStability::RequestData(
450450

451451
status = this->execute(input1_Separatrices, output1_Separatrices);
452452

453-
this->printMsg("Occurence arrays calculated for "
453+
this->printMsg("Occurrence arrays calculated for "
454454
+ std::to_string(input1_Separatrices->GetNumberOfBlocks())
455455
+ " blocks",
456456
1.0, t.getElapsedTime(), this->threadNumber_);

core/vtk/ttkSeparatrixStability/ttkSeparatrixStability.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ class TTKSEPARATRIXSTABILITY_EXPORT ttkSeparatrixStability
2727
protected ttk::SeparatrixStability {
2828

2929
private:
30-
bool ComputeOccurenceType0{true};
31-
bool ComputeOccurenceType1{false};
32-
bool ComputeOccurenceType2{true};
30+
bool ComputeOccurrenceType0{true};
31+
bool ComputeOccurrenceType1{false};
32+
bool ComputeOccurrenceType2{true};
3333
double PX{1};
3434
double PY{1};
3535
double PZ{1};

0 commit comments

Comments
 (0)