1 /*
2 * Copyright (C) 2016 Alberto Irurueta Carro (alberto@irurueta.com)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package com.irurueta.numerical.signal.processing;
17
18 /**
19 * This enumerator indicates how edges should be treated during convolution.
20 * Repeat and mirror edge extension methods can be used to prevent certain
21 * artifacts when reaching edges of signal.
22 */
23 public enum ConvolverEdgeMethod {
24 /**
25 * When convolution kernel reaches edge of signal being convoluted, it is
26 * assumed that the signal value is zero.
27 */
28 ZERO_EDGE,
29
30 /**
31 * When convolution kernel reaches edge of signal being convoluted, it is
32 * assumed that the signal has a constant value (with a value that can be
33 * setup).
34 */
35 CONSTANT_EDGE,
36
37 /**
38 * When convolution kernel reaches edge of signal being convoluted, it is
39 * assumed that the signal is repeated indefinitely.
40 */
41 REPEAT_EDGE,
42
43 /**
44 * When convolution kernel reaches edge of signal being convoluted, it is
45 * assumed that the signal is mirrored.
46 */
47 MIRROR_EDGE
48 }