|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.erichseifert.gral.data.filters.Kernel
public class Kernel
Class that represents an array of coefficients for a weighted filtering. Functionality includes:
Constructor Summary | |
---|---|
Kernel(double... values)
Creates a new kernel object with the specified values and an offset being half the size of this kernel (rounded down). |
|
Kernel(int offset,
double[] values)
Creates a new Kernel object with the specified offset and values. |
Method Summary | |
---|---|
Kernel |
add(double v)
Returns a new Kernel, where the specified value was added to each of the items. |
Kernel |
add(Kernel k)
Returns a new Kernel, where the specified kernel was added. |
double |
get(int i)
Returns the value at the specified position of this kernel. |
int |
getMaxIndex()
Returns the index of the "rightmost" value. |
int |
getMinIndex()
Returns the index of the "leftmost" value. |
int |
getOffset()
Returns the offset of this kernel. |
Kernel |
mul(double v)
Returns a new Kernel, where the specified value was multiplied with each of the items. |
Kernel |
mul(Kernel k)
Returns a new Kernel, where the specified kernel was multiplied. |
Kernel |
negate()
Returns a Kernel with all values being negated. |
Kernel |
normalize()
Returns a normalized Kernel so that the sum of all values equals 1. |
int |
size()
Returns the number of values in this kernel. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Kernel(int offset, double[] values)
offset
- Offset to the first item in the kernel.values
- Array of values in the kernel.public Kernel(double... values)
values
- Data values for the kernel.Method Detail |
---|
public double get(int i)
i
- Index to be returned.
public int getOffset()
public int size()
public int getMinIndex()
public int getMaxIndex()
public Kernel add(double v)
v
- Value to be added.
public Kernel add(Kernel k)
k
- Kernel to be added.
public Kernel mul(double v)
v
- Value to be multiplied.
public Kernel mul(Kernel k)
k
- Kernel to be multiplied.
public Kernel normalize()
public Kernel negate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |