lemon/concepts/heap.h
changeset 208 4317d277ba21
parent 113 18a7ee8fa56e
child 209 765619b7cbb2
equal deleted inserted replaced
1:2b12834fd68c 2:96d72cd66982
   179 	  typedef typename _Heap::Prio OwnPrio;
   179 	  typedef typename _Heap::Prio OwnPrio;
   180 	  typedef typename _Heap::State OwnState;
   180 	  typedef typename _Heap::State OwnState;
   181 
   181 
   182 	  Item item;
   182 	  Item item;
   183 	  Prio prio;
   183 	  Prio prio;
   184 	  State state;
       
   185 	  item=Item();
   184 	  item=Item();
   186 	  prio=Prio();
   185 	  prio=Prio();
   187 	  ignore_unused_variable_warning(item);
   186 	  ignore_unused_variable_warning(item);
   188 	  ignore_unused_variable_warning(prio);
   187 	  ignore_unused_variable_warning(prio);
   189 	  ignore_unused_variable_warning(state);
       
   190 
   188 
   191 	  OwnItem own_item;
   189 	  OwnItem own_item;
   192 	  OwnPrio own_prio;
   190 	  OwnPrio own_prio;
   193 	  OwnState own_state;
   191 	  OwnState own_state;
   194 	  own_item=Item();
   192 	  own_item=Item();
   201 	  _Heap heap2 = heap1;
   199 	  _Heap heap2 = heap1;
   202 	  ignore_unused_variable_warning(heap1);
   200 	  ignore_unused_variable_warning(heap1);
   203 	  ignore_unused_variable_warning(heap2);
   201 	  ignore_unused_variable_warning(heap2);
   204 	  
   202 	  
   205 	  int s = heap.size();
   203 	  int s = heap.size();
       
   204 	  ignore_unused_variable_warning(s);
   206 	  bool e = heap.empty();
   205 	  bool e = heap.empty();
       
   206 	  ignore_unused_variable_warning(e);
   207 
   207 
   208 	  prio = heap.prio();
   208 	  prio = heap.prio();
   209 	  item = heap.top();
   209 	  item = heap.top();
   210 	  prio = heap[item];
   210 	  prio = heap[item];
   211 	  own_prio = heap.prio();
   211 	  own_prio = heap.prio();
   225 
   225 
   226 	  heap.erase(item);
   226 	  heap.erase(item);
   227 	  heap.erase(own_item);
   227 	  heap.erase(own_item);
   228 	  heap.clear();
   228 	  heap.clear();
   229 
   229 
   230 	  state = heap.state(item);
   230 	  own_state = heap.state(own_item);
   231 	  heap.state(item, state);
       
   232 	  state = heap.state(own_item);
       
   233 	  heap.state(own_item, own_state);
   231 	  heap.state(own_item, own_state);
   234 
   232 
   235 	  state = _Heap::PRE_HEAP;
       
   236 	  state = _Heap::IN_HEAP;
       
   237 	  state = _Heap::POST_HEAP;
       
   238 	  own_state = _Heap::PRE_HEAP;
   233 	  own_state = _Heap::PRE_HEAP;
   239 	  own_state = _Heap::IN_HEAP;
   234 	  own_state = _Heap::IN_HEAP;
   240 	  own_state = _Heap::POST_HEAP;
   235 	  own_state = _Heap::POST_HEAP;
   241 	}
   236 	}
   242 
   237