# Interface Kernel1d

@Equality public interface Kernel1d
Defines a smoothing function used for smoothing 1-dimensional uniformly gridded data represented by an array.

Since:
  27 Feb 2015
Author:
  Mark Taylor

## Method Summary

Modifier and Type
Method
Description
`double[]`
`convolve(double[] data)`
Applies this kernel to a data array.
`int`
`getExtent()`
Returns the number of pixels in each direction over which the central point will be smoothed.
`boolean`
`isSquare()`
Indicates whether this kernel has features which are intentionally non-smooth and should be portrayed as such.

## Method Details

### getExtent

int getExtent()
Returns the number of pixels in each direction over which the central point will be smoothed. If the extent is e, only the (2e+1) input data values with indices x-e..x+e will contribute to the data output value with index x.

Returns:
  convolution extent half-width

### convolve

double[] convolve(double[] data)
Applies this kernel to a data array. Note, edge effects will cause distortion of the values within `getExtent` pixels of the start and end of the returned data array, so this method should be called on an input array with sufficient padding at either end that this effect can be ignored.

Parameters:
  `data` - input data array
Returns:
  output data array, same dimensions as input, but containing convolved data

### isSquare

boolean isSquare()
Indicates whether this kernel has features which are intentionally non-smooth and should be portrayed as such. This non-smoothness applies either within the extent or at its edge.

Returns:
  true iff there are non-smooth features that should be visible