yat
0.14.5pre
|
Calculates the Euclidean distance between elements of two ranges. More...
#include <yat/statistics/EuclideanDistance.h>
Public Member Functions | |
double | operator() (Iterator1 beg1, Iterator1 end1, Iterator2 beg2) const |
Friends | |
class | Distance< EuclideanDistance > |
Calculates the Euclidean distance between elements of two ranges.
If elements of both ranges are unweighted the distance is calculated as , where and are elements of the first and second range, respectively.
If elements of one or both of ranges have weights the distance is calculated as , where is the number of elements in the two ranges and and are weights for the elements of the first and the second range, respectively. If the elements of one of the two ranges are unweighted, the weights for these elements are set to unity.
|
inlineinherited |
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