25 #ifndef LSST_AFW_TABLE_MATCH_H
26 #define LSST_AFW_TABLE_MATCH_H
37 namespace lsst {
namespace afw {
namespace table {
46 template <
typename Record1,
typename Record2>
52 Match() : first(), second(), distance(0.0) {}
54 Match(
PTR(Record1)
const & r1,
PTR(Record2)
const & r2,
double dist)
57 template <
typename R1,
typename R2>
62 typedef Match<SimpleRecord,SimpleRecord>
SimpleMatch;
64 typedef Match<SourceRecord,SourceRecord>
SourceMatch;
83 double radius,
bool closest=
true
98 #ifndef SWIG // swig will be confused by the nested names below; repeated with typedefs in match.i
113 template <
typename Cat1,
typename Cat2>
114 std::vector< Match< typename Cat1::Record, typename Cat2::Record> >
matchRaDec(
117 Angle radius,
bool closest =
true
133 template <
typename Cat>
134 std::vector< Match< typename Cat::Record, typename Cat::Record> >
matchRaDec(
137 bool symmetric =
true
148 template <
typename Record1,
typename Record2>
170 template <
typename Cat1,
typename Cat2>
171 std::vector< Match< typename Cat1::Record, typename Cat2::Record> >
178 #endif // #ifndef LSST_AFW_TABLE_MATCH_H
CatalogT< BaseRecord > BaseCatalog
SourceMatchVector matchXy(SourceCatalog const &cat1, SourceCatalog const &cat2, double radius, bool closest=true)
Match< SimpleRecord, SimpleRecord > SimpleMatch
std::vector< ReferenceMatch > ReferenceMatchVector
std::vector< Match< typename Cat1::Record, typename Cat2::Record > > matchRaDec(Cat1 const &cat1, Cat2 const &cat2, Angle radius, bool closest=true)
boost::shared_ptr< Record1 > first
Match(Match< R1, R2 > const &other)
Lightweight representation of a geometric match between two records.
std::vector< SimpleMatch > SimpleMatchVector
Match< SimpleRecord, SourceRecord > ReferenceMatch
BaseCatalog packMatches(std::vector< Match< Record1, Record2 > > const &matches)
Return a table representation of a MatchVector that can be used to persist it.
boost::shared_ptr< Record2 > second
lsst::afw::geom::Angle Angle
Match(boost::shared_ptr< Record1 > const &r1, boost::shared_ptr< Record2 > const &r2, double dist)
Match< SourceRecord, SourceRecord > SourceMatch
std::vector< Match< typename Cat1::Record, typename Cat2::Record > > unpackMatches(BaseCatalog const &matches, Cat1 const &cat1, Cat2 const &cat2)
Reconstruct a MatchVector from a BaseCatalog representation of the matches and a pair of catalogs...
std::vector< SourceMatch > SourceMatchVector
SortedCatalogT< SourceRecord > SourceCatalog