Пример #1
0
double Heatmap::calculateKernelValue( double distance, int bandwidth, int kernelShape )
{
  switch ( kernelShape )
  {
    case Heatmap::Triangular:
      return triangularKernel( distance , bandwidth );

    case Heatmap::Uniform:
      return uniformKernel( distance, bandwidth );

    case Heatmap::Quartic:
      return quarticKernel( distance, bandwidth );

    case Heatmap::Triweight:
      return triweightKernel( distance, bandwidth );

    case Heatmap::Epanechnikov:
      return epanechnikovKernel( distance, bandwidth );
  }
  return 0;

}
Пример #2
0
double Heatmap::calculateKernelValue( const double distance, const int bandwidth, const KernelShape shape, const OutputValues outputType )
{
  switch ( shape )
  {
    case Heatmap::Triangular:
      return triangularKernel( distance, bandwidth, outputType );

    case Heatmap::Uniform:
      return uniformKernel( distance, bandwidth, outputType );

    case Heatmap::Quartic:
      return quarticKernel( distance, bandwidth, outputType );

    case Heatmap::Triweight:
      return triweightKernel( distance, bandwidth, outputType );

    case Heatmap::Epanechnikov:
      return epanechnikovKernel( distance, bandwidth, outputType );
  }
  return 0;

}