| 1340 | } |
| 1341 | |
| 1342 | void vtkGenerateStatistics::ShallowCopy(vtkDataObject* out, vtkDataObject* in) |
| 1343 | { |
| 1344 | // Our output is always composite: |
| 1345 | vtkCompositeDataSet* cdOut = vtkCompositeDataSet::SafeDownCast(out); |
| 1346 | // Use a different method to copy the input if the input is composite |
| 1347 | // so that leaf nodes are not simply references to the input data |
| 1348 | // (since we may modify them). |
| 1349 | if (auto cdIn = vtkCompositeDataSet::SafeDownCast(in)) |
| 1350 | { |
| 1351 | cdOut->CompositeShallowCopy(cdIn); |
| 1352 | } |
| 1353 | else |
| 1354 | { |
| 1355 | out->ShallowCopy(in); |
| 1356 | } |
| 1357 | } |
| 1358 | |
| 1359 | void vtkGenerateStatistics::GenerateSubset(std::unordered_map<vtkIdType, vtkIdType>& subset, |
| 1360 | vtkIdType numberOfSamples, double trainingFraction, vtkUnsignedCharArray* ghostData, |
no test coverage detected