yat
0.14.5pre
|
A convenience class to implement Distance. More...
#include <yat/statistics/Distance.h>
Public Member Functions | |
template<typename Iterator1 , typename Iterator2 > | |
double | operator() (Iterator1 beg1, Iterator1 end1, Iterator2 beg2) const |
A convenience class to implement Distance.
This class provides a convenient way to implement a Distance. The Derived class should implement two private functions derived as shown in example below:
To fulfill Distance these functions should do no more assumtions than that the Iterator1
and Iterator
fulfill
Requirements:
Iterator
is Data IteratorIterator
is Forward Traversal Iterator
|
inline |
Function determines ranges are weighted or unweighted and calls the appropriate function in Derived
.
If both ranges are unweighted function
and otherwise function
is called
Type Requirements:
Iterator1
is a Data IteratorIterator1
is a Forward Traversal IteratorIterator2
is a Data IteratorIterator2
is a Forward Traversal Iterator