KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
diprique.h
Go to the documentation of this file.
1 
6 /*
7  * $Id: diprique.h 17555 2014-09-18 07:36:52Z predoehl $
8  */
9 
10 #ifndef DIPRIQUEUE_H_INCLUDED_PREDOEHL_UOFARIZONAVISION
11 #define DIPRIQUEUE_H_INCLUDED_PREDOEHL_UOFARIZONAVISION 1
12 
13 namespace kjb
14 {
15 namespace qd
16 {
17 
71 template< typename SATELLITE_TYPE >
73 public:
74  typedef SATELLITE_TYPE Sat_tp;
75  typedef float Key_tp;
76  typedef size_t Loc_tp;
77 
80 
82  virtual void clear() = 0;
83 
85  virtual Loc_tp insert( const Key_tp&, const Sat_tp& ) = 0;
86 
88  virtual Loc_tp ins_max_key( const Sat_tp& ) = 0;
89 
91  virtual bool access_loc( Loc_tp, Key_tp*, Sat_tp* ) const = 0;
92 
94  virtual bool erase_loc( Loc_tp ) = 0;
95 
97  virtual Loc_tp Dijkstra_extraction() const = 0;
98 
100  virtual size_t size() const = 0;
101 
103  virtual bool is_empty() const = 0;
104 
106  virtual bool rekey_loc( Loc_tp, const Key_tp& ) = 0;
107 };
108 
109 }
110 }
111 
112 #endif /* DIPRIQUEUE_H_INCLUDED_PREDOEHL_UOFARIZONAVISION */
virtual void clear()=0
we must be able to clear the queue and reuse it
virtual Loc_tp ins_max_key(const Sat_tp &)=0
we must be able to insert a record with key value of "infinity"
virtual Loc_tp Dijkstra_extraction() const =0
get the locator of the record with min (or near min) key
pure virtual interface for priority queue in Dijkstra's algorithm
Definition: diprique.h:72
virtual Loc_tp insert(const Key_tp &, const Sat_tp &)=0
we must be able to insert a record associated with a key value
float Key_tp
type that we use for keys
Definition: diprique.h:75
virtual bool erase_loc(Loc_tp)=0
we want to erase a record via its locator value
size_t Loc_tp
type that we use for locators
Definition: diprique.h:76
virtual bool is_empty() const =0
predicate tests whether the queue is void of elements
virtual ~DijkstraPriorityQueue()
obligatory virtual destructor
Definition: diprique.h:79
SATELLITE_TYPE Sat_tp
type of satellite data
Definition: diprique.h:74
virtual bool access_loc(Loc_tp, Key_tp *, Sat_tp *) const =0
we want to be able to access that record via its locator value
virtual size_t size() const =0
get the number of elements in the queue
virtual bool rekey_loc(Loc_tp, const Key_tp &)=0
we must be able to change (reduce) the key value for a record