| TerraLib 4.1

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

- File List
- File Members

Classes | Defines | Enumerations | Functions
E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/stat/TeKernelFunctions.h File Reference

This file contains functions to spatial kernel estimation: basic, adaptive and ratio. More...

`#include "../kernel/TeException.h"`
`#include "TeKernelParams.h"`
`#include "TeStatDefines.h"`
`#include "../kernel/TeGeometryAlgorithms.h"`
`#include "../kernel/TeProgress.h"`

Go to the source code of this file.

## Classes

class | TeKernelException
class | TeStatKernel
class | TeStatKernelRatio

## Defines

#define | INVALID_KERNEL -TeMAXFLOAT
#define | IDX_ATTR 0
#define | IDX_KERNEL 0
#define | IDX_NUMERATOR 1
#define | IDX_KERNEL1 0
#define | IDX_KERNEL2 1

## Enumerations

enum | TeKernelError { KERNEL_NO_CENTROID, KERNEL_ALL_NULL, KERNEL_INVALID_AREA, KERNEL_INVALID_VALUE, KERNEL_NO_VALUE }

## Functions

STAT_DLL double | TeKernelQuartic (double tau, double distance, double intensity)
STAT_DLL double | TeKernelNormal (double tau, double distance, double intensity)
STAT_DLL double | TeKernelUniform (double tau, double distance, double intensity)
STAT_DLL double | TeKernelTriangular (double tau, double distance, double intensity)
STAT_DLL double | TeKernelNegExponential (double tau, double distance, double intensity)
template<typename ItReg >
double | TeKernelGeometricMean (ItReg &beginReg, ItReg &endReg, int idx)
template<typename ItEvt >
double | KernelNormalizationFactor (ItEvt itBegin, ItEvt itEnd)
| Evaluates normalization factor for kernel.
template<typename ItEvt >
double | TeKernelValue (TeCoord2D &center, ItEvt &begin, ItEvt &end, double radius, TeKernelFunctionType kfunc)
| Evaluates kernel value of events with intensity (attribute) for one support region, for a kernel function.
template<typename EventSet , typename ItRegionSet >
bool | TeKernelNormalize (EventSet &events, ItRegionSet &regionsBegin, ItRegionSet &regionsEnd, TeKernelComputeType kType, double totKernel, int idxProp)
| Normalizes kernel values based on type of computation.
template<typename EventSet , typename ItRegionSet >
bool | TeStatIntKernel (EventSet &events, ItRegionSet &regionsBegin, ItRegionSet &regionsEnd, TeKernelFunctionType kfunc, TeKernelComputeType kType, double radius, int idxProp)
| Evaluates kernel value for all support regions, storing values either on IDX_KERNEL or IDX_NUMERATOR.
template<typename EventSet , typename ItRegionSet >
bool | TeStatAdaptiveGeoMeanIntKernel (EventSet &events, ItRegionSet &regionsBegin, ItRegionSet &regionsEnd, TeKernelFunctionType kfunc, TeKernelComputeType ktype, int, double totalArea, int idxProp)
| Evaluates adaptive kernel value for all support regions, storing values (intermediary and final) in double property idxProp.

## Detailed Description

This file contains functions to spatial kernel estimation: basic, adaptive and ratio.

## Define Documentation

#define IDX_ATTR 0

#define IDX_KERNEL 0

#define IDX_KERNEL1 0

#define IDX_KERNEL2 1

#define IDX_NUMERATOR 1

#define INVALID_KERNEL -TeMAXFLOAT

## Enumeration Type Documentation

enum TeKernelError

Enumerator:

  KERNEL_NO_CENTROID |
  KERNEL_ALL_NULL |
  KERNEL_INVALID_AREA |
  KERNEL_INVALID_VALUE |
  KERNEL_NO_VALUE |

## Function Documentation

template<typename ItEvt >

double KernelNormalizationFactor | ( | ItEvt | itBegin,
|  | ItEvt | itEnd
| ) |  |

Evaluates normalization factor for kernel.

Parameters:

  begin | begin of event set iterator
  end | end of event set iterator

Returns:
  sum of intensities

template<typename ItReg >

double TeKernelGeometricMean | ( | ItReg & | beginReg,
|  | ItReg & | endReg,
|  | int | idx
| ) |  |

Calcula a media geometrica de um conjunto de valores atraves da utilizacao de logaritmos Implementado pelo Andre

STAT_DLL double TeKernelNegExponential | ( | double | tau,
|  | double | distance,
|  | double | intensity
| ) |  |

STAT_DLL double TeKernelNormal | ( | double | tau,
|  | double | distance,
|  | double | intensity
| ) |  |

template<typename EventSet , typename ItRegionSet >

bool TeKernelNormalize | ( | EventSet & | events,
|  | ItRegionSet & | regionsBegin,
|  | ItRegionSet & | regionsEnd,
|  | TeKernelComputeType | kType,
|  | double | totKernel,
|  | int | idxProp
| ) |  |

Normalizes kernel values based on type of computation.

Gets value from IDX_KERNEL and stores it at the same place

Parameters:

  events | set of spatial events
  regionsBegin | begin of regions iterator
  reginsEnd | end of region iterator
  kfunc | type of kernel function
  ktype | type of computation (SMA, density or probability)
  radius | spatial threshold

STAT_DLL double TeKernelQuartic | ( | double | tau,
|  | double | distance,
|  | double | intensity
| ) |  |

Kernel functions

Parameters:

  tau | spatial threshold to define neighboorhood
  distance | distance between event and region centroid
  intensity | attribute value for event

STAT_DLL double TeKernelTriangular | ( | double | tau,
|  | double | distance,
|  | double | intensity
| ) |  |

STAT_DLL double TeKernelUniform | ( | double | tau,
|  | double | distance,
|  | double | intensity
| ) |  |

template<typename ItEvt >

double TeKernelValue | ( | TeCoord2D & | center,
|  | ItEvt & | begin,
|  | ItEvt & | end,
|  | double | radius,
|  | TeKernelFunctionType | kfunc
| ) |  |

Evaluates kernel value of events with intensity (attribute) for one support region, for a kernel function.

Parameters:

  center | support region centroid
  begin | begin of event set iterator
  end | end of event set iterator
  radius | spatial threshold
  kfunc | type of kernel function This function assumes that intensity value of event is available on its first property - if it does not exist, it is set to 1.0 (identity)

template<typename EventSet , typename ItRegionSet >

bool TeStatAdaptiveGeoMeanIntKernel | ( | EventSet & | events,
|  | ItRegionSet & | regionsBegin,
|  | ItRegionSet & | regionsEnd,
|  | TeKernelFunctionType | kfunc,
|  | TeKernelComputeType | ktype,
|  | int | ,
|  | double | totalArea,
|  | int | idxProp
| ) |  |

Evaluates adaptive kernel value for all support regions, storing values (intermediary and final) in double property idxProp.

Parameters:

  events | set of spatial events
  regionsBegin | begin of regions iterator
  reginsEnd | end of region iterator
  kfunc | type of kernel function
  ktype | type of computation (SMA, density or probability)
  numReg | number of support regions -- need to evaluate initial radius
  totalArea | total area of support regions -- need to evaluate initial radius
  idxProp | index of double property

template<typename EventSet , typename ItRegionSet >

bool TeStatIntKernel | ( | EventSet & | events,
|  | ItRegionSet & | regionsBegin,
|  | ItRegionSet & | regionsEnd,
|  | TeKernelFunctionType | kfunc,
|  | TeKernelComputeType | kType,
|  | double | radius,
|  | int | idxProp
| ) |  |

Evaluates kernel value for all support regions, storing values either on IDX_KERNEL or IDX_NUMERATOR.

Parameters:

  events | set of spatial events
  regionsBegin | begin of regions iterator
  reginsEnd | end of region iterator
  kfunc | type of kernel function
  ktype | type of computation (SMA, density or probability)
  radius | spatial threshold
  idxProp | index of double property

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines