mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
Added tests and docstrings to fibonacci_heap.py
This commit is contained in:
parent
a1291fd5ca
commit
c4516d1dfc
|
@ -271,11 +271,11 @@ class FibonacciHeap:
|
|||
def decrease_key(self, node, new_val):
|
||||
"""
|
||||
Decreases the value of a node.
|
||||
|
||||
|
||||
Args:
|
||||
node: The node whose value should be decreased.
|
||||
new_val: The new value for the node.
|
||||
|
||||
|
||||
Raises:
|
||||
ValueError: If new value is greater than current value.
|
||||
"""
|
||||
|
@ -299,11 +299,6 @@ class FibonacciHeap:
|
|||
Args:
|
||||
node: Node to be cut.
|
||||
parent: Parent of the node to be cut.
|
||||
""""""
|
||||
Performs cascading cut operation.
|
||||
|
||||
Args:
|
||||
node: Starting node for cascading cut.
|
||||
"""
|
||||
|
||||
parent.degree -= 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user