public class SOMLibFormatInputReader extends AbstractSOMInputReader
AbstractSOMInputReader.UnitInformation
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
mapDescriptionFileName |
static java.lang.String |
mapFileNameSuffix
The suffix of the map description files
|
private java.lang.String |
unitDescriptionFileName |
static java.lang.String |
unitFileNameSuffix
The suffix of the unit description files
|
static java.lang.String |
weightFileNameSuffix
The suffix of the weight vector files
|
private java.lang.String |
weightVectorFileName |
allVectorNames, commonLabelPrefix, contentType, dim, gridLayout, gridTopology, labelled, metricName, unitInfo, xSize, ySize, zSize
MAP_FILE, UNIT_FILE, WEIGHT_VECTOR
Constructor and Description |
---|
SOMLibFormatInputReader(java.lang.String weightVectorFileName,
java.lang.String unitDescriptionFileName,
java.lang.String mapDescriptionFileName)
Sole constructor taking the name of the weight vector file, the unit description file and the map description
file as arguments.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFilePath()
Returns the name of the path where the files are located.
|
static java.lang.String |
getFormatName() |
java.lang.String |
getMapDescriptionFileName()
Returns the name of the map description file, or null if not loaded.
|
java.lang.String |
getUnitDescriptionFileName()
Returns the name of the unit description file, or
null if not loaded. |
java.lang.String |
getWeightVectorFileName()
Returns the name of the weight vector file, or
null if not loaded. |
protected void |
processUnitElement(java.lang.String line,
int k,
int j,
int i) |
protected void |
readMapDescriptionFile(java.lang.String fileName)
Reads a SOMLib map description file with the given name.
|
protected void |
readUnitDescriptionFile(java.lang.String fileName)
Reads a SOMLib unit description file with the given name.
|
private void |
readWeightVectorFile(java.lang.String fileName)
Reads a SOMLib weight vector file with the given name.
|
getBestContextUnitLabels, getBestContextUnitLabels, getCommonVectorLabelPrefix, getContentType, getContextGateUnitLabels, getContextGateUnitLabels, getDim, getGridLayout, getGridTopology, getKaskiGateUnitLabels, getKaskiGateUnitLabels, getKaskiGateUnitLabelsWgt, getKaskiGateUnitLabelsWgt, getKaskiUnitLabels, getKaskiUnitLabels, getKaskiUnitLabelsWgt, getKaskiUnitLabelsWgt, getMappedVecs, getMappedVecs, getMappedVecsDist, getMappedVecsDist, getMetricName, getNrBestContext, getNrBestContext, getNrContextGateLabels, getNrContextGateLabels, getNrGateWeights, getNrGateWeights, getNrKaskiGateLabels, getNrKaskiGateLabels, getNrKaskiLabels, getNrKaskiLabels, getNrKaskiWeights, getNrKaskiWeights, getNrSomsMapped, getNrSomsMapped, getNrUnitLabels, getNrUnitLabels, getNrVecMapped, getNrVecMapped, getQuantErrorUnit, getQuantErrorUnit, getQuantErrorUnitAvg, getQuantErrorUnitAvg, getUnitLabels, getUnitLabels, getUnitLabelsQe, getUnitLabelsQe, getUnitLabelsWgt, getUnitLabelsWgt, getUrlMappedSoms, getUrlMappedSoms, getVectors, getXSize, getYSize, getZSize, initUnitInformation, isLabelled
public static final java.lang.String mapFileNameSuffix
public static final java.lang.String weightFileNameSuffix
public static final java.lang.String unitFileNameSuffix
private java.lang.String mapDescriptionFileName
private java.lang.String unitDescriptionFileName
private java.lang.String weightVectorFileName
public SOMLibFormatInputReader(java.lang.String weightVectorFileName, java.lang.String unitDescriptionFileName, java.lang.String mapDescriptionFileName) throws java.io.FileNotFoundException, SOMLibFileFormatException
weightVectorFileName
- the name of the weight vector file.unitDescriptionFileName
- the name of the unit description file.mapDescriptionFileName
- the name of the map description file.java.io.FileNotFoundException
- if one of the files with the given name is not found.SOMLibFileFormatException
- if the format of one of the file is corrupt.public java.lang.String getFilePath()
SOMInputReader
SOMInputReader.getFilePath()
public java.lang.String getMapDescriptionFileName()
SOMInputReader
public java.lang.String getUnitDescriptionFileName()
SOMInputReader
null
if not loaded.null
if not loaded.public java.lang.String getWeightVectorFileName()
SOMInputReader
null
if not loaded.null
if not loaded.protected void readMapDescriptionFile(java.lang.String fileName) throws java.io.FileNotFoundException, SOMLibFileFormatException
fileName
- the name of the file to open.java.io.FileNotFoundException
SOMLibFileFormatException
protected void readUnitDescriptionFile(java.lang.String fileName) throws java.io.FileNotFoundException, SOMLibFileFormatException
fileName
- the name of the file to open.java.io.FileNotFoundException
SOMLibFileFormatException
private void readWeightVectorFile(java.lang.String fileName) throws java.io.FileNotFoundException, SOMLibFileFormatException
fileName
- the name of the file to open.java.io.FileNotFoundException
SOMLibFileFormatException
protected void processUnitElement(java.lang.String line, int k, int j, int i)
public static java.lang.String getFormatName()