convolve method
Vector<T>
convolve(
- Vector<
T> kernel, { - DataType<
T> ? dataType, - ConvolutionMode mode = ConvolutionMode.full,
Returns a view of the convolution between this vector and the given
kernel
. The solution is obtained lazily by straightforward computation,
not by using a FFT.
Implementation
Vector<T> convolve(
Vector<T> kernel, {
DataType<T>? dataType,
ConvolutionMode mode = ConvolutionMode.full,
}) {
switch (mode) {
case ConvolutionMode.full:
return FullConvolutionVector<T>(
dataType ?? this.dataType, this, kernel);
case ConvolutionMode.valid:
return ValidConvolutionVector<T>(
dataType ?? this.dataType, this, kernel);
case ConvolutionMode.same:
return SameConvolutionVector<T>(
dataType ?? this.dataType, this, kernel);
}
}