00001
00002
00008 #if !defined(__ads_PriorityQueue_h__)
00009 #define __ads_PriorityQueue_h__
00010
00011 #include "../functor/Dereference.h"
00012
00013 #include <vector>
00014
00015 BEGIN_NAMESPACE_ADS
00016
00018
00026 template < typename T,
00027 typename Key = typename std::iterator_traits<T>::value_type,
00028 class GetKey = Dereference<T>,
00029 class CompareKeys = std::greater<Key>,
00030 class Sequence = std::vector<T> >
00031 class PriorityQueue
00032 {
00033 public:
00034
00036 typedef T element_type;
00038 typedef const element_type& const_reference;
00039
00041 typedef Key key_type;
00042
00044 typedef GetKey get_key_functor;
00045
00047 typedef CompareKeys compare_keys_functor;
00048
00050 typedef Sequence sequence_type;
00051
00053 typedef typename sequence_type::value_type value_type;
00055 typedef typename sequence_type::iterator iterator;
00057 typedef typename sequence_type::difference_type difference_type;
00059 typedef int size_type;
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00073
00074
00075
00076
00078
00079
00080
00081
00082
00083
00084
00085
00087
00088
00089
00090
00092
00093
00094
00095
00096 };
00097
00098 END_NAMESPACE_ADS
00099
00100 #endif