| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/stat/heap.h
Go to the documentation of this file.

    00001 //---------------------------------------------------------------------------
    00002 #ifndef heapH
    00003 #define heapH
    00004
    00005 #include "TeStatDefines.h"
    00006 #include "TeSkaterGrafo.h"
    00007 //---------------------------------------------------------------------------
    00008 class STAT_DLL THeap {
    00009
    00010 /********  Area Privada  *********/
    00011 private:
    00012     /* Tipo dos nos do heap */
    00013     typedef struct TipoHeap {
    00014         double Chave;
    00015         int Indice;
    00016       }TipoHeap_t,*TipoHeap_ptr;
    00017
    00018     /* Estrutura do TAD Heap : Tamanho + Vetor */
    00019     typedef struct Heap {
    00020         int Size;
    00021         TipoHeap_ptr Nos;
    00022         }Heap_t, *Heap_ptr;
    00023    int *KeyAux;
    00024    Heap_ptr MyHeap;
    00025    void  Build_Heap();
    00026    void  UpHeap(int);
    00027    void  DownHeap(int);
    00028    double  GetKey(int);
    00029
    00030 /********  Area Publica  *********/
    00031 public:
    00032    THeap(int);
    00033    double Key(int Indice) {return GetKey(Indice);}
    00034    void  SetKey(int,double);
    00035    int  Extract_Min();
    00036    int  Empty();
    00037 };
    00038 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines