ATLAS Offline Software
Classes | Public Member Functions | Protected Member Functions | List of all members
ObjectMatching Class Reference

ObjectMatching is a base class that performs generic matching of objects using the distance functor framework. More...

#include <ObjectMatching.h>

Inheritance diagram for ObjectMatching:
Collaboration diagram for ObjectMatching:

Classes

class  DistanceCompare
 

Public Member Functions

 ObjectMatching ()
 
virtual ~ObjectMatching ()
 
template<typename T , typename U >
float distance (const T *t, const U *u, const DistanceFunctor< T, U > *metric) const
 distance returns the distance between the two supplied objects using metric, if available, or the default metric, if not. More...
 
template<typename T , typename U >
float distance (const T *t, const U *u) const
 
template<typename T , typename U >
std::vector< const T * > matchToObjects (const U *matchObject, const std::vector< const T * > &targetObjects, float maxDistance, const DistanceFunctor< T, U > *metric) const
 matchToObjects returns the objects of type T from the supplied vector that match to matchObject, sorted by distance from the matchObject according to metric. More...
 
template<typename T , typename U >
std::vector< const T * > matchToObjects (const U *matchObject, const std::vector< const T * > &targetObjects, float maxDistance=0.1) const
 
template<typename T , typename U >
std::vector< const T * > matchToObjects (const U *matchObject, const DataVector< T > &targetObjects, float maxDistance, const DistanceFunctor< T, U > *metric) const
 
template<typename T , typename U >
std::vector< const T * > matchToObjects (const U *matchObject, const DataVector< T > &targetObjects, float maxDistance=0.1) const
 
template<typename T , typename U >
bool anyMatch (const U *matchObject, const std::vector< const T * > &targetObjects, float maxDistance, const DistanceFunctor< T, U > *metric) const
 
template<typename T , typename U >
bool anyMatch (const U *matchObject, const std::vector< const T * > &targetObjects, float maxDistance) const
 
template<typename T , typename U >
const T * matchToObject (const U *matchObject, const std::vector< const T * > &targetObjects, float maxDistance, const DistanceFunctor< T, U > *metric) const
 matchToObject returns the object of type T from the suppled vector that best matches matchObject according to the distance metric, if available, or if not, according the the default metric. More...
 
template<typename T , typename U >
const T * matchToObject (const U *matchObject, const std::vector< const T * > &targetObjects, float maxDistance=0.1) const
 
template<typename T , typename U >
const T * matchToObject (const U *matchObject, const DataVector< T > &targetObjects, float maxDistance, const DistanceFunctor< T, U > *metric) const
 
template<typename T , typename U >
const T * matchToObject (const U *matchObject, const DataVector< T > &targetObjects, float maxDistance=0.1) const
 

Protected Member Functions

template<typename T , typename U >
const DistanceFunctor< T, U > * prepareMetric () const
 

Detailed Description

ObjectMatching is a base class that performs generic matching of objects using the distance functor framework.

Definition at line 20 of file ObjectMatching.h.

Constructor & Destructor Documentation

◆ ObjectMatching()

ObjectMatching::ObjectMatching ( )
inline

Definition at line 24 of file ObjectMatching.h.

24 { ; };

◆ ~ObjectMatching()

virtual ObjectMatching::~ObjectMatching ( )
inlinevirtual

Definition at line 25 of file ObjectMatching.h.

25 { ; };

Member Function Documentation

◆ anyMatch() [1/2]

template<typename T , typename U >
bool ObjectMatching::anyMatch ( const U *  matchObject,
const std::vector< const T * > &  targetObjects,
float  maxDistance 
) const

◆ anyMatch() [2/2]

template<typename T , typename U >
bool ObjectMatching::anyMatch ( const U *  matchObject,
const std::vector< const T * > &  targetObjects,
float  maxDistance,
const DistanceFunctor< T, U > *  metric 
) const

◆ distance() [1/2]

template<typename T , typename U >
float ObjectMatching::distance ( const T *  t,
const U *  u 
) const

◆ distance() [2/2]

template<typename T , typename U >
float ObjectMatching::distance ( const T *  t,
const U *  u,
const DistanceFunctor< T, U > *  metric 
) const

distance returns the distance between the two supplied objects using metric, if available, or the default metric, if not.

◆ matchToObject() [1/4]

template<typename T , typename U >
const T* ObjectMatching::matchToObject ( const U *  matchObject,
const DataVector< T > &  targetObjects,
float  maxDistance,
const DistanceFunctor< T, U > *  metric 
) const

◆ matchToObject() [2/4]

template<typename T , typename U >
const T* ObjectMatching::matchToObject ( const U *  matchObject,
const DataVector< T > &  targetObjects,
float  maxDistance = 0.1 
) const

◆ matchToObject() [3/4]

template<typename T , typename U >
const T* ObjectMatching::matchToObject ( const U *  matchObject,
const std::vector< const T * > &  targetObjects,
float  maxDistance,
const DistanceFunctor< T, U > *  metric 
) const

matchToObject returns the object of type T from the suppled vector that best matches matchObject according to the distance metric, if available, or if not, according the the default metric.

◆ matchToObject() [4/4]

template<typename T , typename U >
const T* ObjectMatching::matchToObject ( const U *  matchObject,
const std::vector< const T * > &  targetObjects,
float  maxDistance = 0.1 
) const

◆ matchToObjects() [1/4]

template<typename T , typename U >
std::vector<const T*> ObjectMatching::matchToObjects ( const U *  matchObject,
const DataVector< T > &  targetObjects,
float  maxDistance,
const DistanceFunctor< T, U > *  metric 
) const

◆ matchToObjects() [2/4]

template<typename T , typename U >
std::vector<const T*> ObjectMatching::matchToObjects ( const U *  matchObject,
const DataVector< T > &  targetObjects,
float  maxDistance = 0.1 
) const

◆ matchToObjects() [3/4]

template<typename T , typename U >
std::vector<const T*> ObjectMatching::matchToObjects ( const U *  matchObject,
const std::vector< const T * > &  targetObjects,
float  maxDistance,
const DistanceFunctor< T, U > *  metric 
) const

matchToObjects returns the objects of type T from the supplied vector that match to matchObject, sorted by distance from the matchObject according to metric.

◆ matchToObjects() [4/4]

template<typename T , typename U >
std::vector<const T*> ObjectMatching::matchToObjects ( const U *  matchObject,
const std::vector< const T * > &  targetObjects,
float  maxDistance = 0.1 
) const

◆ prepareMetric()

template<typename T , typename U >
const DistanceFunctor<T,U>* ObjectMatching::prepareMetric ( ) const
protected

The documentation for this class was generated from the following file: