[Lemon-commits] [lemon_svn] jacint: r1157 - hugo/trunk/src/hugo

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:43:35 CET 2006


Author: jacint
Date: Wed Sep 15 16:04:57 2004
New Revision: 1157

Modified:
   hugo/trunk/src/hugo/fib_heap.h

Log:
docs changes

Modified: hugo/trunk/src/hugo/fib_heap.h
==============================================================================
--- hugo/trunk/src/hugo/fib_heap.h	(original)
+++ hugo/trunk/src/hugo/fib_heap.h	Wed Sep 15 16:04:57 2004
@@ -3,8 +3,8 @@
 #ifndef HUGO_FIB_HEAP_H
 #define HUGO_FIB_HEAP_H
 
-///\ingroup auxdat
 ///\file
+///\ingroup auxdat
 ///\brief Fibonacci Heap implementation.
 
 #include <vector>
@@ -16,28 +16,27 @@
   /// \addtogroup auxdat
   /// @{
 
-  /// An implementation of the Fibonacci Heap.
-
-  /**
-     This class implements the \e Fibonacci \e heap data structure. A \e heap
-     is a data structure for storing items with specified values called \e
-     priorities, such that finding the item with minimum priority with respect
-     to \e Compare is efficient. In a heap one can change the priority of an
-     item, add or erase an item, etc.
-
-     The methods \ref increase and \ref erase are not efficient in a Fibonacci
-     heap. In case of many calls to these operations, it is better to use a
-     \e binary \e heap.
-     
-     \param Item The type of the items to be stored.  
-     \param Prio The type of the priority of the items.
-     \param ItemIntMap A read and writable Item int map, for the usage of
-     the heap.
-     \param Compare A class for the comparison of the priorities. The
-     default is \c std::less<Prio>.
-
-  */
+  /// Fibonacci Heap.
 
+  ///This class implements the \e Fibonacci \e heap data structure. A \e heap
+  ///is a data structure for storing items with specified values called \e
+  ///priorities in such a way that finding the item with minimum priority is
+  ///efficient. \ref Compare specifies the ordering of the priorities. In a heap
+  ///one can change the priority of an item, add or erase an item, etc.
+  ///
+  ///The methods \ref increase and \ref erase are not efficient in a Fibonacci
+  ///heap. In case of many calls to these operations, it is better to use a
+  ///\e binary \e heap.
+  ///
+  ///\param Item Type of the items to be stored.  
+  ///\param Prio Type of the priority of the items.
+  ///\param ItemIntMap A read and writable Item int map, for the usage of
+  ///the heap.
+  ///\param Compare A class for the ordering of the priorities. The
+  ///default is \c std::less<Prio>.
+  ///
+  ///\author Jacint Szabo 
+ 
 #ifdef DOXYGEN
   template <typename Item, 
 	    typename Prio, 
@@ -83,7 +82,7 @@
     ///Checks if the heap stores no items.
     
     /**
-       Returns \c true iff the heap stores no items.
+       Returns \c true if and only if the heap stores no items.
     */
     bool empty() const { return num_items==0; }
 
@@ -104,29 +103,27 @@
     */
     void push (Item const item, PrioType const value);
     
-    
-    ///Returns the item having the minimum priority w.r.t.  Compare.
+    ///Returns the item with minimum priority relative to \ref Compare.
     
     /**
-       This method returns the item having the minimum priority w.r.t.  Compare. 
-       \pre The heap must be nonempty.
+       This method returns the item with minimum priority relative to \ref
+       Compare.  
+       \pre The heap must be nonempty.  
     */
     Item top() const { return container[minimum].name; }
-    
 
-    ///Returns the minimum priority w.r.t.  Compare.
+    ///Returns the minimum priority relative to \ref Compare.
 
     /**
-       It returns the minimum priority w.r.t.  Compare.
+       It returns the minimum priority relative to \ref Compare.
        \pre The heap must be nonempty.
     */
     PrioType prio() const { return container[minimum].prio; }
     
-
     ///Returns the priority of \c item.
 
     /**
-       It returns the priority of \c item.
+       This function returns the priority of \c item.
        \pre \c item must be in the heap.
     */
     PrioType& operator[](const Item& item) { 
@@ -144,12 +141,12 @@
     }
 
 
-    ///Deletes the item with minimum priority w.r.t.  Compare.
+    ///Deletes the item with minimum priority relative to \ref Compare.
 
     /**
-    This method deletes the item with minimum priority w.r.t. 
-    Compare from the heap.
-    \pre The heap must be non-empty.
+    This method deletes the item with minimum priority relative to \ref
+    Compare from the heap.  
+    \pre The heap must be non-empty.  
     */
     void pop();
 
@@ -166,18 +163,17 @@
     /**
        This method decreases the priority of \c item to \c value.
        \pre \c item must be stored in the heap with priority at least \c
-       value w.r.t.  Compare.
+       value relative to \ref Compare.
     */
     void decrease (Item item, PrioType const value); 
 
-
     ///Increases the priority of \c item to \c value.
 
     /**
        This method sets the priority of \c item to \c value. Though
        there is no precondition on the priority of \c item, this
-       method should be used only if there is a need to really \e increase
-       (w.r.t.  Compare) the priority of \c item, because this
+       method should be used only if it is indeed necessary to increase
+       (relative to \ref Compare) the priority of \c item, because this
        method is inefficient.
     */
     void increase (Item item, PrioType const value) {
@@ -186,7 +182,7 @@
     }
 
 
-    ///Tells if \c item is in, was already in, or has never been in the heap.
+    ///Returns if \c item is in, has already been in, or has never been in the heap.
 
     /**
        This method returns PRE_HEAP if \c item has never been in the



More information about the Lemon-commits mailing list