| 776 | } |
| 777 | |
| 778 | std::set<IdentificationDataInternal::ObservationMatchRef> ConsensusMap::getUnassignedIDMatches() const |
| 779 | { |
| 780 | std::set<IdentificationData::ObservationMatchRef> all_matches; |
| 781 | for (auto it = id_data_.getObservationMatches().begin(); |
| 782 | it != id_data_.getObservationMatches().end(); ++it) |
| 783 | { |
| 784 | all_matches.insert(it); |
| 785 | } |
| 786 | std::set<IdentificationData::ObservationMatchRef> assigned_matches; |
| 787 | for (const ConsensusFeature& feat : *this) |
| 788 | { |
| 789 | assigned_matches.insert(feat.getIDMatches().begin(), feat.getIDMatches().end()); |
| 790 | // @TODO: consider subordinate features? - probably not |
| 791 | } |
| 792 | std::set<IdentificationData::ObservationMatchRef> result; |
| 793 | std::set_difference(all_matches.begin(), all_matches.end(), |
| 794 | assigned_matches.begin(), assigned_matches.end(), |
| 795 | inserter(result, result.end())); |
| 796 | return result; |
| 797 | } |
| 798 | |
| 799 | |
| 800 | const IdentificationData& ConsensusMap::getIdentificationData() const |