public class ConvolutionOperation extends java.lang.Object implements DatasetOperation
Modifier and Type | Field and Description |
---|---|
protected double[][] |
kernel
The convolution kernel
|
Constructor and Description |
---|
ConvolutionOperation()
Creates a new ConvolutionOperation with the identity kernel.
|
ConvolutionOperation(Dataset kernel)
Creates a new ConvolutionOperation with the specified kernel.
|
ConvolutionOperation(double[][] k)
Creates a new ConvolutionOperation with the specified kernel.
|
Modifier and Type | Method and Description |
---|---|
int |
getHeight()
Returns the height of the kernel i.e.
|
double[][] |
getKernel()
Returns the convolution kernel.
|
java.util.Map<java.lang.String,java.lang.Object> |
getObjectMap()
Creates a map of the important fields for the instance, suitable for serialization.
|
long |
getSerializationVersion()
Returns the current version of the serialization format.
|
int |
getVersion()
Returns the current class version.
|
int |
getWidth()
Returns the width of the kernel i.e.
|
void |
initCurrentVersion(java.util.Map<java.lang.String,java.lang.Object> objectMap)
Initializes an instance with a current-version object graph.
|
Dataset |
run(Dataset input)
Convolves a Dataset.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init, initPreviousVersion, initUnknownVersion, load, read, save, write
public ConvolutionOperation()
public ConvolutionOperation(double[][] k)
k
- kernel to usepublic ConvolutionOperation(Dataset kernel)
kernel
- kernel to usepublic double[][] getKernel()
public int getWidth()
public int getHeight()
public Dataset run(Dataset input)
run
in interface DatasetOperation
input
- Dataset to convolvepublic long getSerializationVersion()
ObjectMap
getSerializationVersion
in interface ObjectMap
public int getVersion()
ObjectMap
getVersion
in interface ObjectMap
public java.util.Map<java.lang.String,java.lang.Object> getObjectMap()
ObjectMap
getObjectMap
in interface ObjectMap
public void initCurrentVersion(java.util.Map<java.lang.String,java.lang.Object> objectMap)
ObjectMap
initCurrentVersion
in interface ObjectMap
objectMap
- object graph for initialization