/usr/include/terralib/stat/heap.h is in libterralib-dev 4.0.0-5ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | //---------------------------------------------------------------------------
#ifndef heapH
#define heapH
#include "TeStatDefines.h"
#include "TeSkaterGrafo.h"
//---------------------------------------------------------------------------
class STAT_DLL THeap {
/******** Area Privada *********/
private:
/* Tipo dos nos do heap */
typedef struct TipoHeap {
double Chave;
int Indice;
}TipoHeap_t,*TipoHeap_ptr;
/* Estrutura do TAD Heap : Tamanho + Vetor */
typedef struct Heap {
int Size;
TipoHeap_ptr Nos;
}Heap_t, *Heap_ptr;
int *KeyAux;
Heap_ptr MyHeap;
void Build_Heap();
void UpHeap(int);
void DownHeap(int);
double GetKey(int);
/******** Area Publica *********/
public:
THeap(int);
double Key(int Indice) {return GetKey(Indice);}
void SetKey(int,double);
int Extract_Min();
int Empty();
};
#endif
|