uk.ac.starlink.ttools.plot2.layer
Interface Kernel1dShape

All Known Implementing Classes:
StandardKernel1dShape

public interface Kernel1dShape

Factory interface for for Kernel1d smoothing functional forms.

Some implementations are provided in the StandardKernel1dShape class.

Since:
2 Mar 2015
Author:
Mark Taylor

Method Summary
 Kernel1d createFixedWidthKernel(double width)
          Creates a fixed width kernel with a given nominal width.
 Kernel1d createKnnKernel(double k, boolean isSymmetric, int minWidth, int maxWidth)
          Creates an adaptive kernel that uses a K-nearest-neighbours algorithm to determine local smoothing width, so that the width of the kernel is determined by the distance (number of 1-pixel bins) within which the given number k of samples is found.
 String getDescription()
          Returns a short description for this shape.
 String getName()
          Returns a one-word name for this shape.
 

Method Detail

getName

String getName()
Returns a one-word name for this shape.

Returns:
name

getDescription

String getDescription()
Returns a short description for this shape.

Returns:
description

createFixedWidthKernel

Kernel1d createFixedWidthKernel(double width)
Creates a fixed width kernel with a given nominal width. The width is some kind of characteristic half-width in one direction of the smoothing function. It is in units of grid points (array element spacing). It would generally be less than or equal to the kernel's extent.

Parameters:
width - half-width
Returns:
new kernel

createKnnKernel

Kernel1d createKnnKernel(double k,
                         boolean isSymmetric,
                         int minWidth,
                         int maxWidth)
Creates an adaptive kernel that uses a K-nearest-neighbours algorithm to determine local smoothing width, so that the width of the kernel is determined by the distance (number of 1-pixel bins) within which the given number k of samples is found.

The nearest neighbour search may be symmetric or asymmetric. In the asymmetric case, the kernel width is determined separately for the positive and negative directions along the axis.

Minimum and maximum smoothing widths are also supplied as bounds on the smoothing width for the case that the samples are very dense or very spread out (the latter case covers the edge of the data region as well). If minWidth==maxWidth, the result is a fixed-width kernel.

Parameters:
k - number of nearest neighbours included in the distance that characterises the smoothing
isSymmetric - true for bidirectional KNN search, false for unidirectional
minWidth - minimum smoothing width
maxWidth - maximum smoothing width
Returns:
new kernel


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.