MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / getUnassignedIDMatches

Method getUnassignedIDMatches

src/openms/source/KERNEL/FeatureMap.cpp:436–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Calls 3

beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected