tinypile
                                
                                
                                
                                    tinypile copied to clipboard
                            
                            
                            
                        jps.hh: redundant perculateUp call?
    inline void _fixIdx(SizeT i) { _percolateDown(i); _percolateUp(i); }
_percolateDown already calls _percolateUp, so the standalone call seems redundant.
Yes, but the index i may change in _percolateDown() when traversing children. Depending on the new value a node goes either up or down the heap, and since that isn't tracked we need to try both directions.
EDIT: Better explained than i can right now: https://en.wikipedia.org/wiki/Binary_heap#Decrease_or_increase_key
EDIT: Got it. Thank you for taking the time to answer.