Detailed Description
Macro Definition Documentation
Returns the identifier of a child node in a binary heap from the identifier of the parent nodel Actually a node has two children. The first is directly the identifier returned here, the second is the returned value +1.
Definition at line 38 of file heap.c. Referenced by HeapDown(). Function Documentation
Used for debug only.
Definition at line 82 of file heap.c. References Theap::data2id, Error(), GetVectorElement(), Theap::id2data, Theap::last, and VectorSize(). Moves an element up in the heap until it reaches a parent node larger than the moved node The nodes are compared using the LessThan function given in the heap constructor.
Definition at line 119 of file heap.c. References Theap::data, Theap::data2id, FALSE, GetVectorElement(), Theap::hasIDs, HEAP_PARENT, Theap::id2data, Theap::LessThan, SwapVectorElements(), TRUE, and Theap::userData. Referenced by AddElement2Heap(), and UpdateHeapElement(). Moves an element up in the heap until it reaches a children nodes smaller than the moved node The nodes are compared using the LessThan function given in the heap constructor.
Definition at line 159 of file heap.c. References Theap::data, Theap::data2id, FALSE, GetVectorElement(), Theap::hasIDs, HEAP_CHILD, Theap::id2data, Theap::LessThan, SwapVectorElements(), TRUE, and Theap::userData. Referenced by ExtractMinElement(), and UpdateHeapElement().
Comparison operator for identifiers identifying the lower of the two given identifiers.
Comparison operator for doubles identifying the lower of the two given doubles.
Comparison operator for doubles identifying the lower of the two given pairs of doubles. The first double has priority and the second one is only considered if the first one are the same.
Definition at line 224 of file heap.c. Referenced by AtlasBiRRTstar(), AtlasRRTstar(), BiRRTstar(), and RRTstar().
Comparison operator for pointers identifying the lower of the two given pointers.
Initializes an empty heap Examples of use:
Definition at line 237 of file heap.c. References CopyID(), Theap::data, Theap::data2id, DeleteID(), Theap::hasIDs, Theap::id2data, InitVector(), Theap::last, Theap::LessThan, and Theap::userData. Referenced by AtlasAStar(), AtlasBiRRTstar(), AtlasGBF(), AtlasRRTstar(), BiRRTstar(), BuildAtlasFromPoint(), InitHeapOfBoxes(), and RRTstar(). Copies h_src into h_dst. This is a constructor and, thus, h_dst is initialized inside this function.
Definition at line 259 of file heap.c. References CopyVector(), Theap::data, Theap::data2id, Theap::hasIDs, Theap::id2data, Theap::last, Theap::LessThan, and Theap::userData.
Removes all the elements from a heap.
Definition at line 273 of file heap.c. References Theap::data, Theap::data2id, Theap::hasIDs, Theap::id2data, Theap::last, and ResetVector(). Referenced by DeleteHeap().
Returns the number of elements in a heap.
Definition at line 284 of file heap.c. References Theap::last. Referenced by AtlasAStar(), Heap2List(), HeapOfBoxesMaxDiagonal(), HeapOfBoxesMaxSize(), HeapOfBoxesVolume(), MPI_SolveCuikSystem(), and PrintHeapOfBoxes(). Checks if a heap is empty
Definition at line 289 of file heap.c. References Theap::last. Referenced by AtlasAStar(), AtlasGBF(), BuildAtlasFromPoint(), MPI_SolveCuikSystem(), RecursiveReWireRRTstar(), and SolveCuikSystem().
Adds an element to the heap.
Definition at line 294 of file heap.c. References Theap::data, Theap::data2id, Theap::hasIDs, HeapUp(), Theap::id2data, Theap::last, and SetVectorElement(). Referenced by AddBox2HeapOfBoxes(), AddList2Heap(), AtlasAStar(), AtlasGBF(), BuildAtlasFromPoint(), UpdateHeapElement(), WireAtlasRRTstar(), and WireRRTstar().
Updates the position of an element in the heap given its identifier. This function only works for heaps whose elements have an associated identifier (the identifier is required to locate the element to update in the heap). If the elements have no asssocated identifer this function triggers an error. If the element is not included in the heap, it is added.
Definition at line 308 of file heap.c. References AddElement2Heap(), Theap::data, Error(), GetVectorElement(), Theap::hasIDs, HeapDown(), HeapUp(), Theap::id2data, Theap::last, and SetVectorElement(). Referenced by RecursiveReWireRRTstar().
Returns a pointer to a given heap element.
Definition at line 331 of file heap.c. References Theap::data, and GetVectorElement(). Referenced by AtlasAStar(), GetHeapElementWithID(), Heap2List(), HeapOfBoxesMaxDiagonal(), HeapOfBoxesMaxSize(), HeapOfBoxesVolume(), PrintHeapOfBoxes(), and RecursiveReWireRRTstar().
Returns a pointer to a heap element given the element identifier.
Definition at line 340 of file heap.c. References GetHeapElement(), GetHeapPosition(), and Theap::hasIDs.
Returns the current position in the heap of an element given its identifier.
Definition at line 348 of file heap.c. References GetVectorElement(), Theap::hasIDs, Theap::id2data, and NO_UINT. Referenced by GetHeapElementWithID().
Returns a pointer to a the minimal (i.e., the first) element of a heap and removes the element from the heap. This function triggers an error if the heap is empty.
Definition at line 356 of file heap.c. References Theap::data, Theap::data2id, Error(), ExtractVectorElement(), GetVectorElement(), Theap::hasIDs, HeapDown(), Theap::id2data, Theap::last, NO_UINT, RemoveVectorElement(), and SwapVectorElements(). Referenced by AtlasAStar(), AtlasGBF(), BuildAtlasFromPoint(), MPI_SolveCuikSystem(), RecursiveReWireRRTstar(), and SolveCuikSystem().
Deletes the information stored in the heap and frees the allocated memory space.
Definition at line 388 of file heap.c. References Theap::data, Theap::data2id, DeleteVector(), Theap::hasIDs, Theap::id2data, and ResetHeap(). Referenced by AtlasAStar(), AtlasBiRRTstar(), AtlasGBF(), AtlasRRTstar(), BiRRTstar(), BuildAtlasFromPoint(), MPI_SolveCuikSystem(), RRTstar(), and SolveCuikSystem(). |
Follow us!