at.tuwien.ifs.somtoolbox.layers
Interface Layer

All Known Implementing Classes:
GrowingCellLayer, GrowingLayer, MnemonicGrowingLayer, ToroidLayer

public interface Layer

Interface for map layers.
TODO: Currently, this is rather limited to rectangular layer structures.

Version:
$Id: Layer.java 3583 2010-05-21 10:07:41Z mayer $
Author:
Michael Dittenbach

Nested Class Summary
static class Layer.GridLayout
           
static class Layer.GridTopology
           
 
Method Summary
 Unit[] getAllUnits()
          Returns an array of all units in the map layer; the specific order of the units is unspecified.
 double[][] getComponentPlane(int component)
          Returns a component plane of the component specified by the argument component.
 double[][] getComponentPlane(int component, int z)
          Returns a component plane of the component specified by the argument component.
 Layer.GridLayout getGridLayout()
           
 Layer.GridTopology getGridTopology()
           
 String getIdString()
          Returns the identification string of the map layer.
 int getLevel()
          Returns the level of the map layer in a hierarchical model.
 double getMapDistance(int x1, int y1, int z1, int x2, int y2, int z2)
          Returns the distance between two units on the map grid.
 double getMapDistance(Unit u1, Unit u2)
          Returns the distance between two units on the map grid.
 DistanceMetric getMetric()
          Returns the metric used for distance calculation.
 int getNumberOfMappedInputs()
          Returns the total number of Inputs mapped on all units in the map layer.
 QualityMeasure getQualityMeasure()
          Returns the quality information.
 String getRevision()
          Returns the revision string of this layer.
 Unit getUnit(int x, int y)
          Returns the Unit at the position specified by the x and y arguments.
 Unit getUnit(int x, int y, int z)
          Returns the Unit at the position specified by the x and y arguments.
 Unit getUnitForDatum(String name)
          Returns the unit onto which the datum specified by its name by argument name is mapped.
 int getXSize()
          Returns the width of the map layer.
 int getYSize()
          Returns the height of the map layer.
 int getZSize()
          Returns the depth of the map layer.
 

Method Detail

getComponentPlane

double[][] getComponentPlane(int component)
Returns a component plane of the component specified by the argument component. Returns null, if the argument component is out of range.

Parameters:
component - the index of the component.
Returns:
a double matrix containing the values of the weight vectors' respective components, or null if argument component is invalid.

getComponentPlane

double[][] getComponentPlane(int component,
                             int z)
Returns a component plane of the component specified by the argument component. Returns null, if the argument component is out of range.

Parameters:
component - the index of the component.
z - TODO
Returns:
a double matrix containing the values of the weight vectors' respective components, or null if argument component is invalid.

getIdString

String getIdString()
Returns the identification string of the map layer.

Returns:
the identification string of the map layer.

getLevel

int getLevel()
Returns the level of the map layer in a hierarchical model.

Returns:
the level of the map layer in a hierarchical model.

getMapDistance

double getMapDistance(int x1,
                      int y1,
                      int z1,
                      int x2,
                      int y2,
                      int z2)
Returns the distance between two units on the map grid.

Parameters:
x1 - the horizontal position of the first unit.
y1 - the vertical position of the first unit.
z1 - the height position of the first unit.
x2 - the horizontal position of the second unit.
y2 - the vertical position of the second unit.
z2 - the height position of the second unit.
Returns:
the distance between two units.

getMapDistance

double getMapDistance(Unit u1,
                      Unit u2)
Returns the distance between two units on the map grid.

Parameters:
u1 - the first unit.
u2 - the second unit.
Returns:
the distance between two units.

getMetric

DistanceMetric getMetric()
Returns the metric used for distance calculation.

Returns:
the metric used for distance calculation.

getQualityMeasure

QualityMeasure getQualityMeasure()
Returns the quality information.

Returns:
the quality information, or null if not existent.

getRevision

String getRevision()
Returns the revision string of this layer. This string should be written to output files to be able to trace back the implementation revision based on the CVS revision a map was trained with.

Returns:
the revision string of this layer.

getUnit

Unit getUnit(int x,
             int y)
             throws LayerAccessException
Returns the Unit at the position specified by the x and y arguments. A LayerAccessException is thrown, if the coordinates are invalid.

Parameters:
x - the horizontal position on the map layer.
y - the vertical position on the map layer.
Returns:
the unit at the specified position.
Throws:
LayerAccessException - if the coordinates are out of range.

getUnit

Unit getUnit(int x,
             int y,
             int z)
             throws LayerAccessException
Returns the Unit at the position specified by the x and y arguments. A LayerAccessException is thrown, if the coordinates are invalid.

Parameters:
x - the horizontal position on the map layer.
y - the vertical position on the map layer.
z - TODO
Returns:
the unit at the specified position.
Throws:
LayerAccessException - if the coordinates are out of range.

getUnitForDatum

Unit getUnitForDatum(String name)
Returns the unit onto which the datum specified by its name by argument name is mapped.

Parameters:
name - the name of the input datum to be searched for.
Returns:
the unit onto which the datum is mapped, or null if the datum is not found on the map.

getXSize

int getXSize()
Returns the width of the map layer.

Returns:
the width of the map layer.

getYSize

int getYSize()
Returns the height of the map layer.

Returns:
the height of the map layer.

getZSize

int getZSize()
Returns the depth of the map layer.

Returns:
the depth of the map layer.

getNumberOfMappedInputs

int getNumberOfMappedInputs()
Returns the total number of Inputs mapped on all units in the map layer.


getAllUnits

Unit[] getAllUnits()
Returns an array of all units in the map layer; the specific order of the units is unspecified.


getGridTopology

Layer.GridTopology getGridTopology()

getGridLayout

Layer.GridLayout getGridLayout()