|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.tuwien.ifs.somtoolbox.input.SOMLibDataWinnerMapping
public class SOMLibDataWinnerMapping
Reads and encapsules the input data - winner information. This means units that are the best-matching ones for the
single input data, and the distances to those units (the distances are used e.g. by the
SmoothedDataHistograms in their weighted & normalised form.
| Nested Class Summary | |
|---|---|
private class |
SOMLibDataWinnerMapping.DataInformation
Inner class holding the list of a certain number of best-matching units for an certain input datum. |
| Field Summary | |
|---|---|
private SOMLibDataWinnerMapping.DataInformation[] |
dataInfo
|
private boolean |
is3D
|
private boolean |
is3Dcached
|
static int |
MAX_DATA_WINNERS
Maximum data winners that will be written per unit, unless specified otherwise. |
private String |
metric
|
private int |
numBMUs
|
private int |
numVectors
|
| Constructor Summary | |
|---|---|
private |
SOMLibDataWinnerMapping()
|
|
SOMLibDataWinnerMapping(String fileName)
Sole constructor taking the name of the data-winner mapping file as an argument. |
| Method Summary | |
|---|---|
SOMLibDataWinnerMapping |
clone()
|
void |
flipH(int ySize)
Flip around the horizontal axis |
void |
flipV(int xSize)
Flip around the vertical axis |
double[] |
getDists(int datum)
Returns an array of double values containing the distances between the input datum and the
best-matching units sorted ascending. |
static String |
getFileNameSuffix()
|
SOMLibDataWinnerMapping.DataInformation[] |
getInternalDataRepresentationCopy()
|
String[] |
getLabels()
|
String |
getMetric()
|
int |
getNumBMUs()
Returns the number of best-matching units per input datum. |
int |
getNumVectors()
Returns the number of input vectors. |
int |
getVectPos(String label)
Finds the position of input vector by comparing its label. |
int[] |
getXPos(int datum)
Returns an array of int values containing the horizontal positions of the the best-matching units of
the input datum. |
int[] |
getYPos(int datum)
Returns an array of int values containing the vertical positions of the the best-matching units of
the input datum. |
int[] |
getZPos(int datum)
Returns an array of int values containing the depth positions of the the best-matching units of the
input datum. |
boolean |
is3D()
|
static void |
main(String[] args)
|
void |
readDataWinnerMappingFile(String fileName)
Reads from the file and fills the data structure. |
void |
rotate(int quadrants,
int xSize,
int ySize)
Rotate the winner mapping. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_DATA_WINNERS
private SOMLibDataWinnerMapping.DataInformation[] dataInfo
private int numBMUs
private int numVectors
private String metric
private boolean is3D
private boolean is3Dcached
| Constructor Detail |
|---|
public SOMLibDataWinnerMapping(String fileName)
throws FileNotFoundException,
SOMLibFileFormatException
fileName - the name of the data-winner mapping file.
FileNotFoundException - if the file with the given name is not found.
SOMLibFileFormatException - if the format of the file is corrupt.private SOMLibDataWinnerMapping()
| Method Detail |
|---|
public double[] getDists(int datum)
double values containing the distances between the input datum and the
best-matching units sorted ascending. If the argument datum is invalid, an
ArrayIndexOutOfBoundsException will be thrown. The calling function is not obliged to catch it.
datum - the index of the input datum in the list.
public int getNumBMUs()
public int getNumVectors()
public int[] getXPos(int datum)
int values containing the horizontal positions of the the best-matching units of
the input datum. If the argument datum is invalid, an ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.
datum - the index of the input datum in the list.
int values containing the horizontal positions of the the best-matching units of
the input datum.public int[] getYPos(int datum)
int values containing the vertical positions of the the best-matching units of
the input datum. If the argument datum is invalid, an ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.
datum - the index of the input datum in the list.
int values containing the vertical positions of the the best-matching units of
the input datum.public int[] getZPos(int datum)
int values containing the depth positions of the the best-matching units of the
input datum. If the argument datum is invalid, an ArrayIndexOutOfBoundsException will
be thrown. The calling function is not obliged to catch it.
datum - the index of the input datum in the list.
int values containing the depth positions of the the best-matching units of the
input datum.public String[] getLabels()
public int getVectPos(String label)
throws SOMToolboxException
label - The label of the input vector
SOMToolboxException - when label is not found in data winner mapping file
public void readDataWinnerMappingFile(String fileName)
throws FileNotFoundException,
SOMLibFileFormatException
fileName - the name of the file to open.
FileNotFoundException - if the file with the given name is not found.
SOMLibFileFormatException - if the format of the file is corrupt.public boolean is3D()
public String getMetric()
public SOMLibDataWinnerMapping clone()
clone in class Object
public void rotate(int quadrants,
int xSize,
int ySize)
quadrants - rotate the winners for quadrants x 90 degrees (clockwise)public void flipH(int ySize)
public void flipV(int xSize)
public SOMLibDataWinnerMapping.DataInformation[] getInternalDataRepresentationCopy()
public static String getFileNameSuffix()
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||