at.tuwien.ifs.somtoolbox.layers
Class GrowingCellUnit

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.layers.InputContainer
      extended by at.tuwien.ifs.somtoolbox.layers.Unit
          extended by at.tuwien.ifs.somtoolbox.layers.GrowingCellUnit

public class GrowingCellUnit
extends Unit

Extension of Unit, needed to save additional data of growing cell structures

Version:
$Id: GrowingCellUnit.java 3358 2010-02-11 14:35:07Z mayer $
Author:
Johannes Inführ, Andreas Zweng

Nested Class Summary
 
Nested classes/interfaces inherited from class at.tuwien.ifs.somtoolbox.layers.Unit
Unit.FeatureWeightMode
 
Field Summary
private  List<GrowingCellTetraheder> connectedTetraheders
          The Tetraheders this Unit is connected to
private  int diameter
           
private  double posX
          Position of Unit in Displayspace X
private  double posY
          Position of Unit in Displayspace Y
private  double signalCounter
          The signal counter of this unit
private  double voronoiEstimate
          The estimate of space covered by this unit
 
Fields inherited from class at.tuwien.ifs.somtoolbox.layers.Unit
CONTEXT, GATE, KEYWORDS, LABELSOM
 
Constructor Summary
GrowingCellUnit(GrowingCellLayer layer, double[] weights)
          Std Constructor, initializes the unit wich weights
 
Method Summary
 void applyMovement(double deltax, double deltay)
           
 GrowingCellUnit clone()
           
 void connect(GrowingCellTetraheder ct)
          Connects this unit to Tetraheder ct
 void disconnect(GrowingCellTetraheder t)
          Disconnects the Unit from tetraheder t
 boolean equals(Object o)
           
 List<GrowingCellTetraheder> getConnectedTetraheders()
           
 int getDiameter()
           
 double getSignalCounter()
           
 double getVoronoiEstimate()
           
 double getX()
           
 int getXPos()
          Returns the horizontal position of this unit on the map it is part of.
 double getY()
           
 int getYPos()
          Returns the vertical position of this unit on the map it is part of.
 void putAtPosition(double x, double y)
          Puts the Unit at Position (x,y) in Display-Space
 void setSignalCounter(double d)
           
 void setVoronoiEstimate(double voronoiEstimate)
           
 String toString()
           
 
Methods inherited from class at.tuwien.ifs.somtoolbox.layers.Unit
addBatchSomNeighbour, addMappedInput, addMappedInput, addMappedInput, calculateQuantizationError, clearBatchSomList, clearLabels, clearMappedInput, copyFeatureWeights, getBestContextWeights, getContextGateLabels, getDim, getFeatureWeights, getGateWeights, getKaskiGateLabels, getKaskiLabels, getLabels, getLabels, getLayer, getMapIdString, getMapLevel, getMappedSOM, getMapXSize, getMapYSize, getMapZSize, getUnitLabels, getWeightVector, getWeightVectorFromBatchSomNeighbourhood, getZPos, initWeightVectorBySample, isTopLeftUnit, printCoordinates, printCoordinatesSpaceSeparated, printUnitDetails, removeMappedInput, restoreBestContextWeightLabels, restoreContextGateLabels, restoreGateWeightLabels, restoreKaskiGateLabels, restoreKaskiLabels, restoreLabels, restoreMappings, setContextGateLabels, setFeatureWeights, setKaskiGateLabels, setLabels, setMappedSOM, setPositions, setWeightVector, updatePosition, updatePosition
 
Methods inherited from class at.tuwien.ifs.somtoolbox.layers.InputContainer
addMappedInput, clearMappedInputs, getInputIndex, getMappedInputDistance, getMappedInputDistance, getMappedInputDistances, getMappedInputName, getMappedInputNames, getMappedInputNamesAsList, getNumberOfMappedInputs, isMapped
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

connectedTetraheders

private List<GrowingCellTetraheder> connectedTetraheders
The Tetraheders this Unit is connected to


signalCounter

private double signalCounter
The signal counter of this unit


voronoiEstimate

private double voronoiEstimate
The estimate of space covered by this unit


diameter

private int diameter

posX

private double posX
Position of Unit in Displayspace X


posY

private double posY
Position of Unit in Displayspace Y

Constructor Detail

GrowingCellUnit

public GrowingCellUnit(GrowingCellLayer layer,
                       double[] weights)
Std Constructor, initializes the unit wich weights

Parameters:
layer - The layer on which this unit resides
weights - The weight vector of this unit
Method Detail

getSignalCounter

public double getSignalCounter()

setSignalCounter

public void setSignalCounter(double d)

getVoronoiEstimate

public double getVoronoiEstimate()

setVoronoiEstimate

public void setVoronoiEstimate(double voronoiEstimate)

connect

public void connect(GrowingCellTetraheder ct)
Connects this unit to Tetraheder ct


getConnectedTetraheders

public List<GrowingCellTetraheder> getConnectedTetraheders()
Returns:
Tetraheders this unit is connected to

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Unit

disconnect

public void disconnect(GrowingCellTetraheder t)
Disconnects the Unit from tetraheder t


putAtPosition

public void putAtPosition(double x,
                          double y)
Puts the Unit at Position (x,y) in Display-Space


getX

public double getX()
Returns:
X-Coordinate of Unit in Display-Space

getY

public double getY()
Returns:
Y-Coordinate of Unit in Display-Space

getXPos

public int getXPos()
Description copied from class: Unit
Returns the horizontal position of this unit on the map it is part of.

Overrides:
getXPos in class Unit
Returns:
the horizontal position of this unit on the map it is part of.

getYPos

public int getYPos()
Description copied from class: Unit
Returns the vertical position of this unit on the map it is part of.

Overrides:
getYPos in class Unit
Returns:
the vertical position of this unit on the map it is part of.

getDiameter

public int getDiameter()
Returns:
Diameter of Unit (for physics simulation)

applyMovement

public void applyMovement(double deltax,
                          double deltay)
Parameters:
deltax - Movement along x-axis
deltay - Movement along y-axis

clone

public GrowingCellUnit clone()
Overrides:
clone in class Object