|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdatabionics.esom.neighborhood.Neighborhood
public abstract class Neighborhood
Abstract base class for neighborhood kernels on a SOM grid. Subclasses need to override the calculate(int distance) method.
On a grid only integer distances from the center need to be considered. The kernels are assumed to be radial symmetric, so only a one dimensional array for the weights is needed.
Field Summary | |
---|---|
protected static org.apache.log4j.Logger |
log
interface to log4j system |
protected int |
radius
maximum distance from bestmatch on grid to be considered |
protected double |
scaling
scaling factor for all weights |
Constructor Summary | |
---|---|
Neighborhood()
Create a new neighborhood object |
|
Neighborhood(int radius,
double scaling)
Create a new neighborhood object |
Method Summary | |
---|---|
protected abstract double |
calculate(int distance)
Calculate the weight value for this distance. |
double |
get(int distance)
Get weight for distance on grid from kernel center |
abstract void |
init()
Initialize the neighborhood. |
void |
setRadius(int radius)
Set the maximum distance from bestmatch on grid to be considered |
void |
setScaling(double scaling)
Set the scaling factor for all weights |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger log
protected int radius
protected double scaling
Constructor Detail |
---|
public Neighborhood()
public Neighborhood(int radius, double scaling)
radius
- radius of kernelscaling
- scaling factor for all weightsMethod Detail |
---|
protected abstract double calculate(int distance)
distance
- distance from center ([0..radius])
public abstract void init()
public double get(int distance)
distance
- distance from center
public void setRadius(int radius)
radius
- radiuspublic void setScaling(double scaling)
scaling
- scaling
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |