|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdatabionics.esom.neighborhood.Neighborhood
databionics.esom.neighborhood.CachedNeighborhood
public abstract class CachedNeighborhood
Abstract base class for neighborhood kernels with a cache of precalculated values. Subclasses have to override the calculate(int distance) method and might want to override the init() method. Make sure to call super.init() as the last command in init() to initialize the cache.
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
log
interface to log4j system |
protected cern.colt.matrix.DoubleMatrix1D |
weights
cache with precalculated values of the weights |
| Fields inherited from class databionics.esom.neighborhood.Neighborhood |
|---|
radius, scaling |
| Constructor Summary | |
|---|---|
CachedNeighborhood()
Create a new neighborhood object |
|
CachedNeighborhood(int radius,
double scaling)
Create a new neighborhood object |
|
| Method Summary | |
|---|---|
double |
get(int distance)
Get weight for distance from kernel center |
void |
init()
Initialize the neighborhood. |
| Methods inherited from class databionics.esom.neighborhood.Neighborhood |
|---|
calculate, setRadius, setScaling |
| 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 cern.colt.matrix.DoubleMatrix1D weights
| Constructor Detail |
|---|
public CachedNeighborhood()
public CachedNeighborhood(int radius,
double scaling)
radius - radius of kernelscaling - scaling factor for all weights| Method Detail |
|---|
public void init()
init in class Neighborhoodpublic double get(int distance)
get in class Neighborhooddistance - distance on grid from center
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||