Giter Site home page Giter Site logo

fibonacci-heap's Introduction

Fibonacci Heap

This isn't my code, I found it and liked it so I'm saving it here. It's written by John-Mark Gurney from http://resnet.uoregon.edu/~gurney_j/jmpc/

Version 1.1 now supports increasing the key using the fh_replace* functions. Previously it would simply return NULL when you tried to increase the key. It also improves performance slightly by only calling checkcons when we are about to use it, at extract, instead of calling it on every insert.

I have now fixed fh_union and it properly updates the minimum.

Thanks to Ryan Earl for pointing out that in fh_consolidate, it is VERY time consuming to constantly malloc/free an array of pointers. The array is small enough that simply reallocating when more pointers are needed is ok.

Thanks to Thomas Eschbach and Wolfgang Guenther who have pointed out bugs with my code. Wolfgang Guenther provided a fix which put in on the correct track for where the bug was. They have also provided a few test programs that exhibited other bugs which I have now integrated into my source so that you can easily regress test the library.

I have reciently completed a review of the code. I have made a number of improvements with a few minor interface changes. There is another improvement to the rh_replace* family of functions to help eliminate redundant code.

I'm still planning on writing a type safe memory allocator for use with the code instead of using malloc to hopefully improve performance slightly.

fibonacci-heap's People

Contributors

kbranigan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.