estar/Propagator.hpp

Go to the documentation of this file.
00001 /* 
00002  * Copyright (C) 2005 Roland Philippsen <roland dot philippsen at gmx net>
00003  * 
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 2 of the License, or
00007  * (at your option) any later version.
00008  * 
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  * 
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00017  * USA
00018  */
00019 
00020 
00021 #ifndef ESTAR_PROPAGATOR_HPP
00022 #define ESTAR_PROPAGATOR_HPP
00023 
00024 
00025 #include <estar/base.hpp>
00026 #include <estar/Queue.hpp>
00027 #include <list>
00028 
00029 
00030 namespace estar {
00031   
00032   
00033   class Upwind;
00034   class Algorithm;
00035   
00036   
00044   class Propagator
00045   {
00046   private:
00047     friend class PropagatorFactory;
00048     Propagator(vertex_t target_vertex, double target_meta);
00049     
00050   public:
00051     typedef std::list<vertex_t> backpointer_t;
00052     typedef backpointer_t::iterator backpointer_it;
00053     
00054     double GetTargetMeta() const;
00055     vertex_t GetTargetVertex() const;
00056     std::pair<const_queue_it, const_queue_it> GetUpwindNeighbors() const;
00057     std::size_t GetNUpwindNeighbors() const;
00058     
00059     void AddBackpointer(vertex_t vertex);
00060     std::pair<backpointer_it, backpointer_it> GetBackpointers();
00061     std::size_t GetNBackpointers() const;
00062     
00063   private:
00064     const vertex_t m_target_vertex;
00065     const double m_target_meta;
00066     queue_t m_nbor;
00067     backpointer_t m_bp;
00068   };
00069   
00070 } // namespace estar
00071 
00072 #endif // ESTAR_PROPAGATOR_HPP

doxygen SourceForge.net Logo
E* Interpolated Graph Replanner Wed Dec 12 18:55:40 2007