public abstract class AbstractSOMInputReader extends java.lang.Object implements SOMInputReader
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractSOMInputReader.UnitInformation
Inner class holding the information about a specific unit.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<java.lang.String> |
allVectorNames |
protected java.lang.String |
commonLabelPrefix
The common prefix of all input vector labels.
|
protected ContentType |
contentType |
protected int |
dim |
protected Layer.GridLayout |
gridLayout |
protected Layer.GridTopology |
gridTopology |
protected boolean |
labelled |
protected java.lang.String |
metricName |
protected AbstractSOMInputReader.UnitInformation[][][] |
unitInfo |
protected int |
xSize |
protected int |
ySize |
protected int |
zSize |
MAP_FILE, UNIT_FILE, WEIGHT_VECTOR
Constructor and Description |
---|
AbstractSOMInputReader() |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getBestContextUnitLabels(int x,
int y) |
java.lang.String[] |
getBestContextUnitLabels(int x,
int y,
int z) |
java.lang.String |
getCommonVectorLabelPrefix()
Returns the longest substring that is common for all input data items.
|
ContentType |
getContentType()
Returns the content type of the data, stored in the Map description file
|
java.lang.String[] |
getContextGateUnitLabels(int x,
int y) |
java.lang.String[] |
getContextGateUnitLabels(int x,
int y,
int z) |
int |
getDim()
Returns the dimensionality of the weight vectors.
|
Layer.GridLayout |
getGridLayout() |
Layer.GridTopology |
getGridTopology() |
java.lang.String[] |
getKaskiGateUnitLabels(int x,
int y) |
java.lang.String[] |
getKaskiGateUnitLabels(int x,
int y,
int z) |
double[] |
getKaskiGateUnitLabelsWgt(int x,
int y) |
double[] |
getKaskiGateUnitLabelsWgt(int x,
int y,
int z) |
java.lang.String[] |
getKaskiUnitLabels(int x,
int y) |
java.lang.String[] |
getKaskiUnitLabels(int x,
int y,
int z) |
double[] |
getKaskiUnitLabelsWgt(int x,
int y) |
double[] |
getKaskiUnitLabelsWgt(int x,
int y,
int z) |
java.lang.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 . |
java.lang.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 . |
java.lang.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 . |
java.lang.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 . |
java.lang.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 . |
java.lang.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 . |
java.lang.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.
|
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.
|
protected void |
initUnitInformation() |
boolean |
isLabelled()
Returns whether the SOM is labelled.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFilePath, getMapDescriptionFileName, getUnitDescriptionFileName, getWeightVectorFileName
protected Layer.GridLayout gridLayout
protected Layer.GridTopology gridTopology
protected boolean labelled
protected int dim
protected java.lang.String metricName
protected ContentType contentType
protected AbstractSOMInputReader.UnitInformation[][][] unitInfo
protected int xSize
protected int ySize
protected int zSize
protected java.lang.String commonLabelPrefix
getCommonVectorLabelPrefix()
, and
then cached.protected java.util.ArrayList<java.lang.String> allVectorNames
public java.lang.String[] getBestContextUnitLabels(int x, int y)
getBestContextUnitLabels
in interface SOMInputReader
public java.lang.String[] getBestContextUnitLabels(int x, int y, int z)
getBestContextUnitLabels
in interface SOMInputReader
public java.lang.String[] getContextGateUnitLabels(int x, int y)
getContextGateUnitLabels
in interface SOMInputReader
public java.lang.String[] getContextGateUnitLabels(int x, int y, int z)
getContextGateUnitLabels
in interface SOMInputReader
public int getDim()
SOMInputReader
getDim
in interface SOMInputReader
SOMInputReader.getDim()
public java.lang.String[] getKaskiGateUnitLabels(int x, int y)
getKaskiGateUnitLabels
in interface SOMInputReader
public java.lang.String[] getKaskiGateUnitLabels(int x, int y, int z)
getKaskiGateUnitLabels
in interface SOMInputReader
public double[] getKaskiGateUnitLabelsWgt(int x, int y)
getKaskiGateUnitLabelsWgt
in interface SOMInputReader
public double[] getKaskiGateUnitLabelsWgt(int x, int y, int z)
getKaskiGateUnitLabelsWgt
in interface SOMInputReader
public java.lang.String[] getKaskiUnitLabels(int x, int y)
getKaskiUnitLabels
in interface SOMInputReader
public java.lang.String[] getKaskiUnitLabels(int x, int y, int z)
getKaskiUnitLabels
in interface SOMInputReader
public double[] getKaskiUnitLabelsWgt(int x, int y)
getKaskiUnitLabelsWgt
in interface SOMInputReader
public double[] getKaskiUnitLabelsWgt(int x, int y, int z)
getKaskiUnitLabelsWgt
in interface SOMInputReader
public java.lang.String[] getMappedVecs(int x, int y)
SOMInputReader
x
and y
. If the coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.getMappedVecs
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.x
and y
.public java.lang.String[] getMappedVecs(int x, int y, int z)
SOMInputReader
x
and y
. If the coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.getMappedVecs
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.z
- TODOx
and y
.public double[] getMappedVecsDist(int x, int y)
SOMInputReader
x
and y
. If the coordinates are invalid, an
ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.getMappedVecsDist
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.x
and y
.public double[] getMappedVecsDist(int x, int y, int z)
SOMInputReader
x
and y
. If the coordinates are invalid, an
ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.getMappedVecsDist
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.z
- TODOx
and y
.public java.lang.String getMetricName()
SOMInputReader
getMetricName
in interface SOMInputReader
public int getNrBestContext(int x, int y)
getNrBestContext
in interface SOMInputReader
public int getNrBestContext(int x, int y, int z)
getNrBestContext
in interface SOMInputReader
public int getNrContextGateLabels(int x, int y)
getNrContextGateLabels
in interface SOMInputReader
public int getNrContextGateLabels(int x, int y, int z)
getNrContextGateLabels
in interface SOMInputReader
public int getNrGateWeights(int x, int y)
getNrGateWeights
in interface SOMInputReader
public int getNrGateWeights(int x, int y, int z)
getNrGateWeights
in interface SOMInputReader
public int getNrKaskiGateLabels(int x, int y)
getNrKaskiGateLabels
in interface SOMInputReader
public int getNrKaskiGateLabels(int x, int y, int z)
getNrKaskiGateLabels
in interface SOMInputReader
public int getNrKaskiLabels(int x, int y)
getNrKaskiLabels
in interface SOMInputReader
public int getNrKaskiLabels(int x, int y, int z)
getNrKaskiLabels
in interface SOMInputReader
public int getNrKaskiWeights(int x, int y)
getNrKaskiWeights
in interface SOMInputReader
public int getNrKaskiWeights(int x, int y, int z)
getNrKaskiWeights
in interface SOMInputReader
public int getNrSomsMapped(int x, int y)
SOMInputReader
x
and
y
. If the coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown.
The calling function is not obliged to catch it.getNrSomsMapped
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.x
and
y
.public int getNrSomsMapped(int x, int y, int z)
SOMInputReader
x
and
y
. If the coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown.
The calling function is not obliged to catch it.getNrSomsMapped
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.z
- TODOx
and
y
.public int getNrUnitLabels(int x, int y)
SOMInputReader
x
and y
. If the
coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown. The calling function is
not obliged to catch it.getNrUnitLabels
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.x
and y
.public int getNrUnitLabels(int x, int y, int z)
SOMInputReader
x
and y
. If the
coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown. The calling function is
not obliged to catch it.getNrUnitLabels
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.z
- TODOx
and y
.public int getNrVecMapped(int x, int y)
SOMInputReader
x
and
y
. If the coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown.
The calling function is not obliged to catch it.getNrVecMapped
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.x
and
y
.public int getNrVecMapped(int x, int y, int z)
SOMInputReader
x
and
y
. If the coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown.
The calling function is not obliged to catch it.getNrVecMapped
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.z
- TODOx
and
y
.public double getQuantErrorUnit(int x, int y)
SOMInputReader
x
and y
. If
the coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown. The calling function
is not obliged to catch it.getQuantErrorUnit
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.x
and y
.public double getQuantErrorUnit(int x, int y, int z)
SOMInputReader
x
and y
. If
the coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown. The calling function
is not obliged to catch it.getQuantErrorUnit
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.z
- TODOx
and y
.public double getQuantErrorUnitAvg(int x, int y)
SOMInputReader
x
and y
.
If the coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown. The calling
function is not obliged to catch it.getQuantErrorUnitAvg
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.x
and y
.public double getQuantErrorUnitAvg(int x, int y, int z)
SOMInputReader
x
and y
.
If the coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown. The calling
function is not obliged to catch it.getQuantErrorUnitAvg
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.z
- TODOx
and y
.public java.lang.String[] getUnitLabels(int x, int y)
SOMInputReader
x
and y
. If the coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.getUnitLabels
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.x
and y
.public java.lang.String[] getUnitLabels(int x, int y, int z)
SOMInputReader
x
and y
. If the coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.getUnitLabels
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.z
- TODOx
and y
.public double[] getUnitLabelsQe(int x, int y)
SOMInputReader
x
and y
. If the coordinates are invalid, an
ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.getUnitLabelsQe
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.x
and y
.public double[] getUnitLabelsQe(int x, int y, int z)
SOMInputReader
x
and y
. If the coordinates are invalid, an
ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.getUnitLabelsQe
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.z
- TODOx
and y
.public double[] getUnitLabelsWgt(int x, int y)
SOMInputReader
x
and y
. If the coordinates are invalid, an
ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.getUnitLabelsWgt
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.x
and y
.public double[] getUnitLabelsWgt(int x, int y, int z)
SOMInputReader
x
and y
. If the coordinates are invalid, an
ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.getUnitLabelsWgt
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.z
- TODOx
and y
.public java.lang.String[] getUrlMappedSoms(int x, int y)
SOMInputReader
x
and y
. If the coordinates are invalid, an
ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.getUrlMappedSoms
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.x
and y
.public java.lang.String[] getUrlMappedSoms(int x, int y, int z)
SOMInputReader
x
and y
. If the coordinates are invalid, an
ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.getUrlMappedSoms
in interface SOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.z
- TODOx
and y
.public double[][][][] getVectors()
SOMInputReader
getVectors
in interface SOMInputReader
public int getXSize()
SOMInputReader
getXSize
in interface SOMInputReader
public int getYSize()
SOMInputReader
getYSize
in interface SOMInputReader
public int getZSize()
SOMInputReader
getZSize
in interface SOMInputReader
protected void initUnitInformation()
public java.lang.String getCommonVectorLabelPrefix()
SOMInputReader
getCommonVectorLabelPrefix
in interface SOMInputReader
public boolean isLabelled()
SOMInputReader
isLabelled
in interface SOMInputReader
public Layer.GridLayout getGridLayout()
getGridLayout
in interface SOMInputReader
public Layer.GridTopology getGridTopology()
getGridTopology
in interface SOMInputReader
public ContentType getContentType()
SOMInputReader
getContentType
in interface SOMInputReader