IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17196


Ignore:
Timestamp:
Mar 28, 2008, 3:28:22 PM (18 years ago)
Author:
eugene
Message:

sort stars to speed the ingest

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/src/get2mass_ops.c

    r16810 r17196  
    256256  return (sky);
    257257}
     258
     259int get2mass_sortStars (TMStars *tstars, int Ntstars) {
     260
     261# define SWAPFUNC(A,B){ TMStars temp = tstars[A]; tstars[A] = tstars[B]; tstars[B] = temp; }
     262# define COMPARE(A,B)(tstars[A].R < tstars[B].R)
     263
     264  OHANA_SORT (Ntstars, COMPARE, SWAPFUNC);
     265
     266# undef SWAPFUNC
     267# undef COMPARE
     268 
     269  return TRUE;
     270}
Note: See TracChangeset for help on using the changeset viewer.