at.tuwien.ifs.somtoolbox.input
Interface SOMInputReader

All Known Implementing Classes:
AbstractSOMInputReader, ESOMFormatInputReader, MnemonicSOMLibFormatInputReader, SOMLibFormatInputReader, SOMPAKFormatInputReader

public interface SOMInputReader

Interface for classes providing the functionality of reading network models from file.

Version:
$Id: SOMInputReader.java 3583 2010-05-21 10:07:41Z mayer $
Author:
Michael Dittenbach, Rudolf Mayer

Field Summary
static String MAP_FILE
           
static String UNIT_FILE
           
static String WEIGHT_VECTOR
           
 
Method Summary
 String[] getBestContextUnitLabels(int x, int y)
           
 String[] getBestContextUnitLabels(int x, int y, int z)
           
 String getCommonVectorLabelPrefix()
          Returns the longest substring that is common for all input data items.
 String[] getContextGateUnitLabels(int x, int y)
           
 String[] getContextGateUnitLabels(int x, int y, int z)
           
 int getDim()
          Returns the dimensionality of the weight vectors.
 String getFilePath()
          Returns the name of the path where the files are located.
 Layer.GridLayout getGridLayout()
           
 Layer.GridTopology getGridTopology()
           
 String[] getKaskiGateUnitLabels(int x, int y)
           
 String[] getKaskiGateUnitLabels(int x, int y, int z)
           
 double[] getKaskiGateUnitLabelsWgt(int x, int y)
           
 double[] getKaskiGateUnitLabelsWgt(int x, int y, int z)
           
 String[] getKaskiUnitLabels(int x, int y)
           
 String[] getKaskiUnitLabels(int x, int y, int z)
           
 double[] getKaskiUnitLabelsWgt(int x, int y)
           
 double[] getKaskiUnitLabelsWgt(int x, int y, int z)
           
 String getMapDescriptionFileName()
          Returns the name of the map description file, or null if not loaded.
 String[] getMappedVecs(int x, int y)
          Returns an array of strings containing the names of vectors mapped onto a certain unit specified by coordinates x and y.
 String[] getMappedVecs(int x, int y, int z)
          Returns an array of strings containing the names of vectors mapped onto a certain unit specified by coordinates x and y.
 double[] getMappedVecsDist(int x, int y)
          Returns an array of double values containing the distances between mapped vectors and the unit specified by coordinates x and y.
 double[] getMappedVecsDist(int x, int y, int z)
          Returns an array of double values containing the distances between mapped vectors and the unit specified by coordinates x and y.
 String getMetricName()
          Returns the name of the metric used for distance calculation.
 int getNrBestContext(int x, int y)
           
 int getNrBestContext(int x, int y, int z)
           
 int getNrContextGateLabels(int x, int y)
           
 int getNrContextGateLabels(int x, int y, int z)
           
 int getNrGateWeights(int x, int y)
           
 int getNrGateWeights(int x, int y, int z)
           
 int getNrKaskiGateLabels(int x, int y)
           
 int getNrKaskiGateLabels(int x, int y, int z)
           
 int getNrKaskiLabels(int x, int y)
           
 int getNrKaskiLabels(int x, int y, int z)
           
 int getNrKaskiWeights(int x, int y)
           
 int getNrKaskiWeights(int x, int y, int z)
           
 int getNrSomsMapped(int x, int y)
          Returns the number of subordinate maps of a certain unit specified by coordinates x and y.
 int getNrSomsMapped(int x, int y, int z)
          Returns the number of subordinate maps of a certain unit specified by coordinates x and y.
 int getNrUnitLabels(int x, int y)
          Returns the number of labels of a certain unit specified by coordinates x and y.
 int getNrUnitLabels(int x, int y, int z)
          Returns the number of labels of a certain unit specified by coordinates x and y.
 int getNrVecMapped(int x, int y)
          Returns the number of vectors mapped onto a certain unit specified by coordinates x and y.
 int getNrVecMapped(int x, int y, int z)
          Returns the number of vectors mapped onto a certain unit specified by coordinates x and y.
 double getQuantErrorUnit(int x, int y)
          Returns the quantization error of a certain unit specified by coordinates x and y.
 double getQuantErrorUnit(int x, int y, int z)
          Returns the quantization error of a certain unit specified by coordinates x and y.
 double getQuantErrorUnitAvg(int x, int y)
          Returns the mean quantization error of a certain unit specified by coordinates x and y.
 double getQuantErrorUnitAvg(int x, int y, int z)
          Returns the mean quantization error of a certain unit specified by coordinates x and y.
 String getUnitDescriptionFileName()
          Returns the name of the unit description file, or null if not loaded.
 String[] getUnitLabels(int x, int y)
          Returns an array of strings containing the names of labels of a certain unit specified by coordinates x and y.
 String[] getUnitLabels(int x, int y, int z)
          Returns an array of strings containing the names of labels of a certain unit specified by coordinates x and y.
 double[] getUnitLabelsQe(int x, int y)
          Returns an array of double values containing the quantization error of the labels of a unit specified by coordinates x and y.
 double[] getUnitLabelsQe(int x, int y, int z)
          Returns an array of double values containing the quantization error of the labels of a unit specified by coordinates x and y.
 double[] getUnitLabelsWgt(int x, int y)
          Returns an array of double values containing the mean values of the labels of a unit specified by coordinates x and y .
 double[] getUnitLabelsWgt(int x, int y, int z)
          Returns an array of double values containing the mean values of the labels of a unit specified by coordinates x and y .
 String[] getUrlMappedSoms(int x, int y)
          Returns an array of strings containing the file names of subordinate maps of a certain unit specified by coordinates x and y.
 String[] getUrlMappedSoms(int x, int y, int z)
          Returns an array of strings containing the file names of subordinate maps of a certain unit specified by coordinates x and y.
 double[][][][] getVectors()
          Returns a 4-dimensional double array of the weight vectors.
 String getWeightVectorFileName()
          Returns the name of the weight vector file, or null if not loaded.
 int getXSize()
          Returns the number of units in horizontal direction.
 int getYSize()
          Returns the number of units in vertical direction.
 int getZSize()
          Returns the number of units in depth.
 boolean isLabelled()
          Returns whether the SOM is labelled.
 

Field Detail

UNIT_FILE

static final String UNIT_FILE
See Also:
Constant Field Values

WEIGHT_VECTOR

static final String WEIGHT_VECTOR
See Also:
Constant Field Values

MAP_FILE

static final String MAP_FILE
See Also:
Constant Field Values
Method Detail

getDim

int getDim()
Returns the dimensionality of the weight vectors.

Returns:
the dimensionality of the weight vectors.

getFilePath

String getFilePath()
Returns the name of the path where the files are located.

Returns:
the name of the path where the files are located.

getMapDescriptionFileName

String getMapDescriptionFileName()
Returns the name of the map description file, or null if not loaded.

Returns:
the name of the map description file, or null if not loaded.

getMappedVecs

String[] getMappedVecs(int x,
                       int y)
Returns an array of strings containing the names of vectors mapped onto a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
Returns:
an array of strings containing the names of vectors mapped onto a certain unit specified by coordinates x and y.

getMappedVecs

String[] getMappedVecs(int x,
                       int y,
                       int z)
Returns an array of strings containing the names of vectors mapped onto a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
z - TODO
Returns:
an array of strings containing the names of vectors mapped onto a certain unit specified by coordinates x and y.

getMappedVecsDist

double[] getMappedVecsDist(int x,
                           int y)
Returns an array of double values containing the distances between mapped vectors and the unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
Returns:
an array of double values containing the distances between mapped vectors and the unit specified by coordinates x and y.

getMappedVecsDist

double[] getMappedVecsDist(int x,
                           int y,
                           int z)
Returns an array of double values containing the distances between mapped vectors and the unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
z - TODO
Returns:
an array of double values containing the distances between mapped vectors and the unit specified by coordinates x and y.

getMetricName

String getMetricName()
Returns the name of the metric used for distance calculation.

Returns:
the name of the metric used for distance calculation.

getNrSomsMapped

int getNrSomsMapped(int x,
                    int y)
Returns the number of subordinate maps of a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
Returns:
the number of subordinate maps of a certain unit specified by coordinates x and y.

getNrSomsMapped

int getNrSomsMapped(int x,
                    int y,
                    int z)
Returns the number of subordinate maps of a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
z - TODO
Returns:
the number of subordinate maps of a certain unit specified by coordinates x and y.

getNrUnitLabels

int getNrUnitLabels(int x,
                    int y)
Returns the number of labels of a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
Returns:
the number of labels of a certain unit specified by coordinates x and y.

getNrUnitLabels

int getNrUnitLabels(int x,
                    int y,
                    int z)
Returns the number of labels of a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
z - TODO
Returns:
the number of labels of a certain unit specified by coordinates x and y.

getNrKaskiGateLabels

int getNrKaskiGateLabels(int x,
                         int y)

getNrKaskiGateLabels

int getNrKaskiGateLabels(int x,
                         int y,
                         int z)

getNrKaskiLabels

int getNrKaskiLabels(int x,
                     int y)

getNrKaskiLabels

int getNrKaskiLabels(int x,
                     int y,
                     int z)

getNrContextGateLabels

int getNrContextGateLabels(int x,
                           int y)

getNrContextGateLabels

int getNrContextGateLabels(int x,
                           int y,
                           int z)

getNrKaskiWeights

int getNrKaskiWeights(int x,
                      int y)

getNrKaskiWeights

int getNrKaskiWeights(int x,
                      int y,
                      int z)

getNrGateWeights

int getNrGateWeights(int x,
                     int y)

getNrGateWeights

int getNrGateWeights(int x,
                     int y,
                     int z)

getNrBestContext

int getNrBestContext(int x,
                     int y)

getNrBestContext

int getNrBestContext(int x,
                     int y,
                     int z)

getNrVecMapped

int getNrVecMapped(int x,
                   int y)
Returns the number of vectors mapped onto a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
Returns:
the number of vectors mapped onto a certain unit specified by coordinates x and y.

getNrVecMapped

int getNrVecMapped(int x,
                   int y,
                   int z)
Returns the number of vectors mapped onto a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
z - TODO
Returns:
the number of vectors mapped onto a certain unit specified by coordinates x and y.

getQuantErrorUnit

double getQuantErrorUnit(int x,
                         int y)
Returns the quantization error of a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
Returns:
the quantization error of a certain unit specified by coordinates x and y.

getQuantErrorUnit

double getQuantErrorUnit(int x,
                         int y,
                         int z)
Returns the quantization error of a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
z - TODO
Returns:
the quantization error of a certain unit specified by coordinates x and y.

getQuantErrorUnitAvg

double getQuantErrorUnitAvg(int x,
                            int y)
Returns the mean quantization error of a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
Returns:
the mean quantization error of a certain unit specified by coordinates x and y.

getQuantErrorUnitAvg

double getQuantErrorUnitAvg(int x,
                            int y,
                            int z)
Returns the mean quantization error of a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
z - TODO
Returns:
the mean quantization error of a certain unit specified by coordinates x and y.

getUnitDescriptionFileName

String getUnitDescriptionFileName()
Returns the name of the unit description file, or null if not loaded.

Returns:
the name of the unit description file, or null if not loaded.

getUnitLabels

String[] getUnitLabels(int x,
                       int y)
Returns an array of strings containing the names of labels of a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
Returns:
an array of strings containing the names of labels of a certain unit specified by coordinates x and y.

getUnitLabels

String[] getUnitLabels(int x,
                       int y,
                       int z)
Returns an array of strings containing the names of labels of a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
z - TODO
Returns:
an array of strings containing the names of labels of a certain unit specified by coordinates x and y.

getKaskiGateUnitLabels

String[] getKaskiGateUnitLabels(int x,
                                int y)

getKaskiGateUnitLabels

String[] getKaskiGateUnitLabels(int x,
                                int y,
                                int z)

getContextGateUnitLabels

String[] getContextGateUnitLabels(int x,
                                  int y)

getContextGateUnitLabels

String[] getContextGateUnitLabels(int x,
                                  int y,
                                  int z)

getKaskiUnitLabels

String[] getKaskiUnitLabels(int x,
                            int y)

getKaskiUnitLabels

String[] getKaskiUnitLabels(int x,
                            int y,
                            int z)

getBestContextUnitLabels

String[] getBestContextUnitLabels(int x,
                                  int y)

getBestContextUnitLabels

String[] getBestContextUnitLabels(int x,
                                  int y,
                                  int z)

getUnitLabelsQe

double[] getUnitLabelsQe(int x,
                         int y)
Returns an array of double values containing the quantization error of the labels of a unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
Returns:
an array of double values containing the quantization error of the labels of a unit specified by coordinates x and y.

getUnitLabelsQe

double[] getUnitLabelsQe(int x,
                         int y,
                         int z)
Returns an array of double values containing the quantization error of the labels of a unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
z - TODO
Returns:
an array of double values containing the quantization error of the labels of a unit specified by coordinates x and y.

getUnitLabelsWgt

double[] getUnitLabelsWgt(int x,
                          int y)
Returns an array of double values containing the mean values of the labels of a unit specified by coordinates x and y . If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
Returns:
an array of double values containing the mean values of the labels of a unit specified by coordinates x and y .

getUnitLabelsWgt

double[] getUnitLabelsWgt(int x,
                          int y,
                          int z)
Returns an array of double values containing the mean values of the labels of a unit specified by coordinates x and y . If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
z - TODO
Returns:
an array of double values containing the mean values of the labels of a unit specified by coordinates x and y .

getKaskiUnitLabelsWgt

double[] getKaskiUnitLabelsWgt(int x,
                               int y)

getKaskiUnitLabelsWgt

double[] getKaskiUnitLabelsWgt(int x,
                               int y,
                               int z)

getKaskiGateUnitLabelsWgt

double[] getKaskiGateUnitLabelsWgt(int x,
                                   int y)

getKaskiGateUnitLabelsWgt

double[] getKaskiGateUnitLabelsWgt(int x,
                                   int y,
                                   int z)

getUrlMappedSoms

String[] getUrlMappedSoms(int x,
                          int y)
Returns an array of strings containing the file names of subordinate maps of a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
Returns:
an array of strings containing the file names of subordinate maps of a certain unit specified by coordinates x and y.

getUrlMappedSoms

String[] getUrlMappedSoms(int x,
                          int y,
                          int z)
Returns an array of strings containing the file names of subordinate maps of a certain unit specified by coordinates x and y. If the coordinates are invalid, an ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.

Parameters:
x - horizontal position of the unit on the map.
y - vertical position of the unit on the map.
z - TODO
Returns:
an array of strings containing the file names of subordinate maps of a certain unit specified by coordinates x and y.

getVectors

double[][][][] getVectors()
Returns a 4-dimensional double array of the weight vectors. The first dimension represents units of a map in horizontal direction, the second dimension represents the units of a map in vertical direction and the third dimension represents units of a map in depth.

Returns:
a 4-dimensional double array of the weight vectors.

getWeightVectorFileName

String getWeightVectorFileName()
Returns the name of the weight vector file, or null if not loaded.

Returns:
the name of the weight vector file, or null if not loaded.

getXSize

int getXSize()
Returns the number of units in horizontal direction.

Returns:
the number of units in horizontal direction.

getYSize

int getYSize()
Returns the number of units in vertical direction.

Returns:
the number of units in vertical direction.

getZSize

int getZSize()
Returns the number of units in depth.

Returns:
the number of units in depth.

getGridTopology

Layer.GridTopology getGridTopology()

getGridLayout

Layer.GridLayout getGridLayout()

getCommonVectorLabelPrefix

String getCommonVectorLabelPrefix()
Returns the longest substring that is common for all input data items. Use this to improve the visual display of vector labels.


isLabelled

boolean isLabelled()
Returns whether the SOM is labelled.