 Timestamp:
 Feb 21, 2008, 8:20:59 PM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/doc/concepts.doxygen
r1113 r1115 36 36 \section Description 37 37 38 \ref concept_distance is a concept .. 38 \ref concept_distance is a concept for classes implementing different 39 alternatives to calculate the distance between two points. 39 40 40 41 \section Requirements 41 42 42 Classes modelling the concept \ref concept_distance should implement ... 43 Classes modelling the concept \ref concept_distance should implement 44 the following public function: 45 46 \verbatim 47 template<typename Iter1, typename Iter2> 48 double operator() (Iter1 beg1, Iter1 end1, Iter2 beg2) const 49 \endverbatim 50 51 This function should calculate and return the distance between 52 elements of two ranges. The first range is given by [\a beg1, \a end1) 53 and the second range starts with \a beg2 and has the same length as 54 the first range. The function should support iterators of the category 55 std::forward_iterator. The function should provide both a fast 56 calculation for unweighted iterators and a calculation for weighted 57 iterators. The latter correspond to the case where elements in a range 58 have both a value and a weight. The selection between unweighted and 59 weighted implementations should utilize 60 theplu::yat::utility::weighted_iterator_tag. Moreover 61 theplu::yat::utility::weighted_if_any2 should be utilized to provide a 62 weighted implementation if any of the two ranges is weighted, and an 63 unweighted implementation when both ranges are unweighted. 64 65 \section Implementations 43 66 44 67 Examples of classes modelling the concept \ref concept_distance … … 60 83 61 84 Classes modelling the concept \ref concept_neighbor_weighting should 62 implement the following function:85 implement the following public function: 63 86 64 87 \verbatim … … 78 101 class. The total vote for each class is stored in the vector \a prediction. 79 102 103 \section Implementations 104 80 105 Examples of classes modelling the concept \ref 81 106 concept_neighbor_weighting include
Note: See TracChangeset
for help on using the changeset viewer.