| LSSTApplications
    20.0.0
    LSSTDataManagementBasePackage | 
 
 
 
Go to the documentation of this file.
   39         : baselist(
list), 
count(
list.size()), stars(
count), nslice(nXSlice), index(nslice + 1) {
 
   40     if (
count == 0) 
return;
 
   44     for (
auto const &ci : 
list) {
 
   63     for (
unsigned islice = 1; islice < 
nslice; ++islice) {
 
   65         while (istar < 
count && 
stars[istar]->
x < xend) ++istar;
 
   66         index[islice] = istar;
 
   69     for (
unsigned islice = 0; islice < 
nslice; ++islice) {
 
   72                  return (E1->y < E2->y);
 
   78     for (
unsigned i = 0; i < 
count; ++i) {
 
   84                                                         bool (*SkipIt)(
const BaseStar &))
 const {
 
   85     if (
count == 0) 
return nullptr;
 
   87     if (*it == 
nullptr) 
return nullptr;
 
   89     double minDist2 = maxDist * maxDist;
 
   90     for (; *it != 
nullptr; ++it) {
 
   91         if (SkipIt && SkipIt(**it)) 
continue;
 
   93         if (dist2 < minDist2) {
 
  103                                                           bool (*SkipIt)(
const BaseStar &))
 const {
 
  105     if (
count == 0) 
return nullptr;
 
  107     if (*it == 
nullptr) 
return nullptr;
 
  110     double minDist1_2 = maxDist * maxDist;
 
  111     double minDist2_2 = maxDist * maxDist;
 
  112     for (; *it != 
nullptr; ++it) {
 
  113         if (SkipIt && SkipIt(**it)) 
continue;
 
  115         if (dist2 < minDist1_2) {
 
  117             minDist2_2 = minDist1_2;
 
  120         } 
else if (dist2 < minDist2_2) {
 
  138         int half_span = span / 2;
 
  140         if ((*middle)->y < yVal) {
 
  144             span -= (span - half_span);
 
  156         int half_span = span / 2;
 
  158         if ((*middle)->y > yVal) {
 
  162             span -= (span - half_span);
 
  181         : finder(F), null_value(F.stars.
end()) {
 
  198     yEnd = where.
y + maxDist;
 
  226     if (current != null_value &&
 
  227         (current < finder.stars.begin() || current >= finder.stars.begin() + finder.count)) {
 
  228         LOGLS_ERROR(_log, 
"Error in FastFinder " << *current << 
" " << *(finder.stars.begin()) << 
' ' 
  229                                                  << *(finder.stars.begin() + finder.count));
 
  
pstar locateYEnd(pstar begin, pstar end, double yVal) const
void findRangeInSlice(const int iSlice, const double yStart, const double yEnd, pstar &start, pstar &end) const
Iterator beginScan(const Point &where, double maxDist) const
void print(std::ostream &out) const
mostly for debugging
std::shared_ptr< const BaseStar > secondClosest(const Point &where, const double maxDist, std::shared_ptr< const BaseStar > &closest, bool(*SkipIt)(const BaseStar &)=nullptr) const
std::vector< unsigned > index
Iterator meant to traverse objects within some limiting distance.
#define LOGLS_ERROR(logger, message)
std::vector< std::shared_ptr< const BaseStar > > stars
decltype(stars) typedef ::value_type stars_element
double computeDist2(const Point &other) const
distance squared to other
FastFinder::Iterator Iterator
Iterator(const FastFinder &f, const Point &where, double maxDist)
stars_element operator*() const
std::shared_ptr< const BaseStar > findClosest(const Point &where, const double maxDist, bool(*SkipIt)(const BaseStar &)=nullptr) const
Find the closest with some rejection capability.
decltype(stars) typedef ::const_iterator pstar
A base class for image defects.
pstar locateYStart(pstar begin, pstar end, double yVal) const
This is an auxillary class for matching objects from starlists.
Fast locator in starlists.
const FastFinder & finder
The base class for handling stars. Used by all matching routines.
LSST DM logging module built on log4cxx.
FastFinder(const BaseStarList &list, const unsigned nXSlice=100)
Constructor.