Class FastFinder¶
Defined in File FastFinder.h
Class Documentation¶
-
class
FastFinder
¶ Fast locator in starlists.
This is an auxillary class for matching objects from starlists. It allows to locate rapidly the closest objects from a given position. The very simple strategy is to sort objects according to 1 coordinate x, and to build an index that allows to select the objects with the x coordinate inside an interval. Then every slice in x is sorted according to y, which enables a fast scan inside a x slice. listMatchCollect takes about 10ms (PC 450 MHz, optimized “-O4”) for a match between lists of about 2000 objects each, which is fast enough for our needs. The same “locator” is used in listMatchupShift, to avoid scanning the whole input lists. Timing on listMatchCollect and listMatchupShift indicates a gain in speed by more than one order of magnitude after implementation of this FastFinder.
Public Functions
-
FastFinder
(const BaseStarList &list, const unsigned nXSlice = 100)¶ Constructor.
-
std::shared_ptr<const BaseStar> lsst::jointcal::FastFinder::findClosest(const Point & where, const double maxDist, bool(*SkipIt)(const BaseStar &) = nullptr) const
Find the closest with some rejection capability.
-
std::shared_ptr<const BaseStar> lsst::jointcal::FastFinder::secondClosest(const Point & where, const double maxDist, std::shared_ptr< const BaseStar > & closest, bool(*SkipIt)(const BaseStar &) = nullptr) const
-
void
dump
() const¶ mostly for debugging
-
void
findRangeInSlice
(const int iSlice, const double yStart, const double yEnd, pstar &start, pstar &end) const¶
-
pstar
locateYStart
(pstar begin, pstar end, double yVal) const¶
-
pstar
locateYEnd
(pstar begin, pstar end, double yVal) const¶
Public Members
-
decltype(stars) typedef ::value_type lsst::jointcal::FastFinder::stars_element
-
decltype(stars) typedef ::const_iterator lsst::jointcal::FastFinder::pstar
-
const BaseStarList
baselist
¶
-
unsigned
count
¶
-
unsigned
nslice
¶
-
std::vector<unsigned>
index
¶
-
double
xmin
¶
-
double
xmax
¶
-
double
xstep
¶
-