@@ -251,15 +251,15 @@ func (heap *FloatingFibonacciHeap) DequeueMin() (*Entry, error) {
251
251
func (heap * FloatingFibonacciHeap ) DecreaseKey (node * Entry , newPriority float64 ) (* Entry , error ) {
252
252
253
253
if heap .IsEmpty () {
254
- return nil , EmptyHeapError ("Cannot decrease key in an empty heap" )
254
+ return nil , EmptyHeapError ("cannot decrease key in an empty heap" )
255
255
}
256
256
257
257
if node == nil {
258
- return nil , NilError ("Cannot decrease key: given node is nil" )
258
+ return nil , NilError ("cannot decrease key: given node is nil" )
259
259
}
260
260
261
261
if newPriority >= node .Priority {
262
- return nil , fmt .Errorf ("The given new priority: %v, is larger than or equal to the old: %v" ,
262
+ return nil , fmt .Errorf ("the given new priority: %v, is larger than or equal to the old: %v" ,
263
263
newPriority , node .Priority )
264
264
}
265
265
@@ -271,11 +271,11 @@ func (heap *FloatingFibonacciHeap) DecreaseKey(node *Entry, newPriority float64)
271
271
func (heap * FloatingFibonacciHeap ) Delete (node * Entry ) error {
272
272
273
273
if heap .IsEmpty () {
274
- return EmptyHeapError ("Cannot delete element from an empty heap" )
274
+ return EmptyHeapError ("cannot delete element from an empty heap" )
275
275
}
276
276
277
277
if node == nil {
278
- return NilError ("Cannot delete node: given node is nil" )
278
+ return NilError ("cannot delete node: given node is nil" )
279
279
}
280
280
281
281
decreaseKeyUnchecked (heap , node , - math .MaxFloat64 )
@@ -291,7 +291,7 @@ func (heap *FloatingFibonacciHeap) Delete(node *Entry) error {
291
291
func (heap * FloatingFibonacciHeap ) Merge (other * FloatingFibonacciHeap ) (FloatingFibonacciHeap , error ) {
292
292
293
293
if heap == nil || other == nil {
294
- return FloatingFibonacciHeap {}, NilError ("One of the heaps to merge is nil. Cannot merge" )
294
+ return FloatingFibonacciHeap {}, NilError ("one of the heaps to merge is nil. Cannot merge" )
295
295
}
296
296
297
297
resultSize := heap .size + other .size
0 commit comments