MCPcopy Create free account
hub / github.com/Kitware/VTK / PrepareAlgorithmRequests

Method PrepareAlgorithmRequests

Filters/ParallelStatistics/vtkGenerateStatistics.cxx:1305–1334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1303}
1304
1305void vtkGenerateStatistics::PrepareAlgorithmRequests(
1306 const std::vector<vtkSmartPointer<vtkAbstractArray>>& columns)
1307{
1308 int mm = static_cast<int>(columns.size());
1309 int nn = this->StatisticsAlgorithm->GetMaximumNumberOfColumnsPerRequest();
1310 this->StatisticsAlgorithm->ResetRequests();
1311 if (nn > 0 && mm > nn)
1312 {
1313 auto* combo = vtkMath::BeginCombination(mm, nn);
1314 for (int more = 1; more && combo; more = vtkMath::NextCombination(mm, nn, combo))
1315 {
1316 this->StatisticsAlgorithm->ResetAllColumnStates();
1317 for (int ii = 0; ii < nn; ++ii)
1318 {
1319 this->StatisticsAlgorithm->SetColumnStatus(columns[combo[ii]]->GetName(), true);
1320 }
1321 this->StatisticsAlgorithm->RequestSelectedColumns();
1322 }
1323 vtkMath::FreeCombination(combo);
1324 }
1325 else
1326 {
1327 this->StatisticsAlgorithm->ResetAllColumnStates();
1328 for (const auto& column : columns)
1329 {
1330 this->StatisticsAlgorithm->SetColumnStatus(column->GetName(), true);
1331 }
1332 this->StatisticsAlgorithm->RequestSelectedColumns();
1333 }
1334}
1335
1336vtkIdType vtkGenerateStatistics::GetNumberOfObservationsForTraining(vtkIdType N)
1337{

Callers 1

RequestDataPlainMethod · 0.95

Calls 6

ResetRequestsMethod · 0.80
ResetAllColumnStatesMethod · 0.80
SetColumnStatusMethod · 0.80
sizeMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected