cheshirekow  v0.1.0
Distance.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Josh Bialkowski (jbialk@mit.edu)
3  *
4  * This file is part of mpblocks.
5  *
6  * mpblocks is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * mpblocks is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with mpblocks. If not, see <http://www.gnu.org/licenses/>.
18  */
27 #ifndef MPBLOCKS_DUBINS_KD_TREE_DISTANCE_H_
28 #define MPBLOCKS_DUBINS_KD_TREE_DISTANCE_H_
29 
30 
31 
32 namespace mpblocks {
33 namespace dubins {
34 namespace kd_tree {
35 
37 template <typename Format>
38 class Distance
39 {
40  public:
42  typedef Eigen::Matrix<Format,3,1> State_t;
43 
44  private:
45  Format m_radius;
46 
47  public:
48  Distance( Format radius=1 ):m_radius(radius){}
49 
50  void set_radius( Format radius ){ m_radius = radius; }
51 
53  Format operator()( const State_t& pa, const State_t& pb );
54 
57  Format operator()( const State_t& p, const Hyper_t& h );
58 };
59 
60 
61 
62 } // namespace kd_tree
63 } // namespace dubins
64 } // namespace mpblocks
65 
66 
67 
68 #endif // DEFAULTDISTANCE_H_
provides r2_s1 distance computation
Definition: Distance.h:38
Traits< Format >::HyperRect Hyper_t
Definition: Distance.h:41
void set_radius(Format radius)
Definition: Distance.h:50
Format operator()(const State_t &pa, const State_t &pb)
return the dubins shortest path distance from point a to point b
Definition: Distance.hpp:38
Eigen::Matrix< Format, 3, 1 > State_t
Definition: Distance.h:42