Commit 339b4d34 authored by Jan Möbius's avatar Jan Möbius
Browse files

Documentation and indents

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@721 fdac6126-5c0c-442c-9429-916003d36597
parent 92f6c3a1
...@@ -82,7 +82,7 @@ namespace Utils { // BEGIN_NS_UTILS ...@@ -82,7 +82,7 @@ namespace Utils { // BEGIN_NS_UTILS
/** This class demonstrates the HeapInterface's interface. If you /** This class demonstrates the HeapInterface's interface. If you
* want to build your customized heap you will have to specity a heap * want to build your customized heap you will have to specify a heap
* interface class and use this class as a template parameter for the * interface class and use this class as a template parameter for the
* class HeapT. This class defines the interface that this heap * class HeapT. This class defines the interface that this heap
* interface has to implement. * interface has to implement.
...@@ -111,8 +111,8 @@ struct HeapInterfaceT ...@@ -111,8 +111,8 @@ struct HeapInterfaceT
* *
* An efficient, highly customizable heap. * An efficient, highly customizable heap.
* *
* The main difference (and performace boost) of this heap compared * The main difference (and performance boost) of this heap compared
* to e.g. the heap of the STL is that here to positions of the * to e.g. the heap of the STL is that here the positions of the
* heap's elements are accessible from the elements themself. * heap's elements are accessible from the elements themself.
* Therefore if one changes the priority of an element one does not * Therefore if one changes the priority of an element one does not
* have to remove and re-insert this element, but can just call the * have to remove and re-insert this element, but can just call the
...@@ -244,13 +244,13 @@ public: ...@@ -244,13 +244,13 @@ public:
{ {
if (((j=left(i))<size()) && interface_.greater(entry(i), entry(j))) if (((j=left(i))<size()) && interface_.greater(entry(i), entry(j)))
{ {
omerr() << "Heap condition violated\n"; omerr() << "Heap condition violated\n";
ok=false; ok=false;
} }
if (((j=right(i))<size()) && interface_.greater(entry(i), entry(j))) if (((j=right(i))<size()) && interface_.greater(entry(i), entry(j)))
{ {
omerr() << "Heap condition violated\n"; omerr() << "Heap condition violated\n";
ok=false; ok=false;
} }
} }
return ok; return ok;
...@@ -341,8 +341,7 @@ downheap(unsigned int _idx) ...@@ -341,8 +341,7 @@ downheap(unsigned int _idx)
childIdx = left(_idx); childIdx = left(_idx);
if (childIdx >= s) break; if (childIdx >= s) break;
if ((childIdx+1 < s) && if ((childIdx + 1 < s) && (interface_.less(entry(childIdx + 1), entry(childIdx))))
(interface_.less(entry(childIdx+1), entry(childIdx))))
++childIdx; ++childIdx;
if (interface_.less(h, entry(childIdx))) break; if (interface_.less(h, entry(childIdx))) break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment