This file is indexed.

/usr/include/terralib/stat/TeSkaterFunctions.h is in libterralib-dev 4.3.0+dfsg.2-11.

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
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
//---------------------------------------------------------------------------
#ifndef ParticaoH
#define ParticaoH



#define SKATER_SEM_POPULACAO 0
#define SKATER_COM_POPULACAO 1


#define SKATER_POR_GRUPO     0
#define SKATER_POR_POPULACAO 1
#define SKATER_POR_AMBOS     2

#include "TeSkaterGrafo.h"
#include "TeSkaterArvore.h"
#include "filaR.h"
#include "filaDouble.h"
#include "filaInt.h"
#include <string>
#include <vector>
using namespace std;

class TeElementSet;

class STAT_DLL TParticao{
private:
  double*  BFS_Media(int,int,long*);
  double  BFS_Desvio(int,int,double*);
  double  Dist(int,double*);
  void  BFS_Main(TFilaR::Item_ptr);//Raiz,Populacao,Desvio
  TSkaterGrafo *Grafo;
  long PopMin;
  int Num_Grupos;
public:
  TFilaR *Clusters;
  TParticao(TSkaterGrafo*);
  ~TParticao();
  TFilaDouble *QuedaDesv; 
  void  Particiona(int,long);
  void  BFS_Salva(TeSTElementSet& regSet, string name);
};

/** Funcao de regionalizacao de um conjunto de poligonos
 *  hasPop: se ha atributo de populacao, que devera ser o ultimo
 *  tipo:   tipo de quebra, por grupo, por populacao ou por ambos
 *  nGrupos: numero de grupos de quebra
 *  popMin:  tamanho minimo da populacao
 *  regSet:  conjunto de areas a serem regionalizadas, com seus atributos
 *  hetDrop: heterogeneidade dado cada uma das divisoes
 **/
template<typename Matrix> bool 
TeSkaterFunction(bool hasPop, int tipo, int nGrupos, int popMin, TeSTElementSet& regSet, 
				  Matrix* proxMatrix, string resName, vector<double>& hetDrop); 


template<typename Matrix> bool 
TeSkaterFunction(bool hasPop, int tipo, int nGrupos, int popMin, TeSTElementSet& regSet, 
				 Matrix* proxMatrix, string name, vector<double>& hetDrop) 
{
  
	TParticao *Particao = 0;
	try
	{
		//Monta grafo a partir do conjunto 
	  TSkaterGrafo g(hasPop);
	  if (!g.MontaGrafo(regSet, proxMatrix)) {
		return false;
	  }

	  TArvore* a = new TArvore();
	  a->Monta_Arvore(&g);
	  delete a;

  
	  Particao = new TParticao(&g);
	  switch (tipo) {
	  case SKATER_POR_GRUPO:
		 Particao->Particiona(nGrupos,-1);
		 break;
	  case SKATER_POR_POPULACAO:
		 Particao->Particiona(0,popMin);
		 break;
	  case SKATER_POR_AMBOS:
		 Particao->Particiona(nGrupos,popMin);
		 break;
	  }

	  Particao->BFS_Salva(regSet, name);

	  //Copia as quedas a partir do numero de grupos para hetDrop,
	  //comecando do menor
	  hetDrop.clear();
	  int size = Particao->QuedaDesv->Size();
	  for (int gr = 0; gr < size; gr++) {
		double het = Particao->QuedaDesv->Retira();
		hetDrop.push_back(het);
	  }
	  delete Particao;
	}
	catch(...)
	{
		if(Particao)
			delete Particao;

		return false;
	}

  return true;
}

//---------------------------------------------------------------------------
#endif