| 434 | |
| 435 | |
| 436 | std::set<IdentificationDataInternal::ObservationMatchRef> FeatureMap::getUnassignedIDMatches() const |
| 437 | { |
| 438 | std::set<IdentificationData::ObservationMatchRef> all_matches; |
| 439 | for (auto it = id_data_.getObservationMatches().begin(); |
| 440 | it != id_data_.getObservationMatches().end(); ++it) |
| 441 | { |
| 442 | all_matches.insert(it); |
| 443 | } |
| 444 | std::set<IdentificationData::ObservationMatchRef> assigned_matches; |
| 445 | for (const Feature& feat : *this) |
| 446 | { |
| 447 | assigned_matches.insert(feat.getIDMatches().begin(), feat.getIDMatches().end()); |
| 448 | // @TODO: consider subordinate features? - probably not |
| 449 | } |
| 450 | std::set<IdentificationData::ObservationMatchRef> result; |
| 451 | std::set_difference(all_matches.begin(), all_matches.end(), |
| 452 | assigned_matches.begin(), assigned_matches.end(), |
| 453 | inserter(result, result.end())); |
| 454 | return result; |
| 455 | } |
| 456 | |
| 457 | |
| 458 | const IdentificationData& FeatureMap::getIdentificationData() const |
no test coverage detected