Deletes all samples with zero features marked by KillSample.
| 570 | |
| 571 | // Deletes all samples with zero features marked by KillSample. |
| 572 | void 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. |
no test coverage detected