MCPcopy Create free account
hub / github.com/creatale/node-dv / DeleteDeadSamples

Method DeleteDeadSamples

deps/tesseract/classify/trainingsampleset.cpp:572–577  ·  view source on GitHub ↗

Deletes all samples with zero features marked by KillSample.

Source from the content-addressed store, hash-verified

570
571// Deletes all samples with zero features marked by KillSample.
572void TrainingSampleSet::DeleteDeadSamples() {
573 samples_.compact(
574 NewPermanentTessCallback(this, &TrainingSampleSet::DeleteableSample));
575 num_raw_samples_ = samples_.size();
576 // Samples must be re-organized now we have deleted a few.
577}
578
579// Callback function returns true if the given sample is to be deleted, due
580// to having a negative classid.

Callers 2

IncludeJunkMethod · 0.80

Calls 3

NewPermanentTessCallbackFunction · 0.85
compactMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected