yat  0.21pre
Distance.h
1 #ifndef theplu_yat_statistics_distance_h
2 #define theplu_yat_statistics_distance_h
3 
4 // $Id: Distance.h 3548 2017-01-01 04:56:44Z peter $
5 
6 /*
7  Copyright (C) 2016 Peter Johansson
8 
9  This file is part of the yat library, http://dev.thep.lu.se/yat
10 
11  The yat library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU General Public License as
13  published by the Free Software Foundation; either version 3 of the
14  License, or (at your option) any later version.
15 
16  The yat library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with yat. If not, see <http://www.gnu.org/licenses/>.
23 */
24 
25 #include "yat/utility/iterator_traits.h"
26 
27 #include <boost/concept_check.hpp>
28 
29 namespace theplu {
30 namespace yat {
31 namespace statistics {
32 
64  template<class Derived>
65  class Distance
66  {
67  public:
89  template <typename Iterator1, typename Iterator2>
90  double operator()(Iterator1 beg1, Iterator1 end1, Iterator2 beg2) const
91  {
93  typename weighted_if_any2<Iterator1, Iterator2>::type tag;
94  return static_cast<const Derived*>(this)->distance(beg1, end1, beg2, tag);
95  }
96  };
97 
98 }}} // of namespace statistics, yat, and theplu
99 
100 #endif
The Department of Theoretical Physics namespace as we define it.
A convenience class to implement Distance.
Definition: Distance.h:65
double operator()(Iterator1 beg1, Iterator1 end1, Iterator2 beg2) const
Definition: Distance.h:90
Definition: iterator_traits.h:159

Generated on Wed Jan 25 2023 03:34:29 for yat by  doxygen 1.8.14