mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 04:45:31 +08:00
refs #484 Optimize getClosestObjects by using CSequence::partiallySort.
This commit is contained in:
@@ -50,6 +50,11 @@ namespace BlackMisc
|
||||
*/
|
||||
CONTAINER findWithinRange(const BlackMisc::Geo::ICoordinateGeodetic &coordinate, const BlackMisc::PhysicalQuantities::CLength &range) const;
|
||||
|
||||
/*!
|
||||
* Find 0..n objects closest to the given coordinate.
|
||||
*/
|
||||
CONTAINER findClosest(int number, const BlackMisc::Geo::ICoordinateGeodetic &coordinate) const;
|
||||
|
||||
protected:
|
||||
//! Constructor
|
||||
IGeoObjectList();
|
||||
@@ -79,6 +84,9 @@ namespace BlackMisc
|
||||
//! If distance is already set, just sort
|
||||
void sortByDistanceToOwnAircraft();
|
||||
|
||||
//! Sort the first n closest objects
|
||||
void partiallySortByDistanceToOwnAircraft(int number);
|
||||
|
||||
//! Get n closest objects
|
||||
CONTAINER getClosestObjects(int number) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user