Skip to content

Instantly share code, notes, and snippets.

@madsravn
Created September 10, 2013 12:14

Revisions

  1. madsravn created this gist Sep 10, 2013.
    16 changes: 16 additions & 0 deletions Dijkstra.hpp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    #ifndef DIJKSTRA_HPP_
    #define DIJKSTRA_HPP_
    #include "IQueue.hpp"
    class Dijkstra {

    public:
    Dijkstra();
    Dijkstra(IQueue queue);


    private:
    IQueue pq;


    };
    #endif
    16 changes: 16 additions & 0 deletions FHeap.hpp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    #ifndef FHEAP_HPP_
    #define FHEAP_HPP_

    #include "FTree.hpp"
    #include "IQueue.hpp"
    #include <vector>

    class FHeap : public IQueue {
    public:
    FHeap();
    virtual void MakeHeap();
    private:
    std::vector<FTree> forest;
    };

    #endif
    13 changes: 13 additions & 0 deletions IQueue.hpp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #ifndef IQUEUE_HPP_
    #define IQUEUE_HPP_

    class IQueue {
    public:
    virtual void MakeHeap() = 0;
    protected:
    IQueue() {}

    };


    #endif