public class SOMLibFormatInputReader extends AbstractSOMInputReader
AbstractSOMInputReader.UnitInformation
Modifier and Type | Field and Description |
---|---|
private String |
mapDescriptionFileName |
static String |
mapFileNameSuffix
The suffix of the map description files
|
private String |
unitDescriptionFileName |
static String |
unitFileNameSuffix
The suffix of the unit description files
|
static String |
weightFileNameSuffix
The suffix of the weight vector files
|
private String |
weightVectorFileName |
allVectorNames, commonLabelPrefix, contentType, dim, gridLayout, gridTopology, labelled, metricName, unitInfo, xSize, ySize, zSize
MAP_FILE, UNIT_FILE, WEIGHT_VECTOR
Constructor and Description |
---|
SOMLibFormatInputReader(String weightVectorFileName,
String unitDescriptionFileName,
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 |
---|---|
String |
getFilePath()
Returns the name of the path where the files are located.
|
static String |
getFormatName() |
String |
getMapDescriptionFileName()
Returns the name of the map description file, or null if not loaded.
|
String |
getUnitDescriptionFileName()
Returns the name of the unit description file, or
null if not loaded. |
String |
getWeightVectorFileName()
Returns the name of the weight vector file, or
null if not loaded. |
protected void |
processUnitElement(String line,
int k,
int j,
int i) |
protected void |
readMapDescriptionFile(String fileName)
Reads a SOMLib map description file with the given name.
|
protected void |
readUnitDescriptionFile(String fileName)
Reads a SOMLib unit description file with the given name.
|
private void |
readWeightVectorFile(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 String mapFileNameSuffix
public static final String weightFileNameSuffix
public static final String unitFileNameSuffix
private String mapDescriptionFileName
private String unitDescriptionFileName
private String weightVectorFileName
public SOMLibFormatInputReader(String weightVectorFileName, String unitDescriptionFileName, String mapDescriptionFileName) throws 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.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 String getFilePath()
SOMInputReader
SOMInputReader.getFilePath()
public String getMapDescriptionFileName()
SOMInputReader
public String getUnitDescriptionFileName()
SOMInputReader
null
if not loaded.null
if not loaded.public String getWeightVectorFileName()
SOMInputReader
null
if not loaded.null
if not loaded.protected void readMapDescriptionFile(String fileName) throws FileNotFoundException, SOMLibFileFormatException
fileName
- the name of the file to open.FileNotFoundException
SOMLibFileFormatException
protected void readUnitDescriptionFile(String fileName) throws FileNotFoundException, SOMLibFileFormatException
fileName
- the name of the file to open.FileNotFoundException
SOMLibFileFormatException
private void readWeightVectorFile(String fileName) throws FileNotFoundException, SOMLibFileFormatException
fileName
- the name of the file to open.FileNotFoundException
SOMLibFileFormatException
protected void processUnitElement(String line, int k, int j, int i)
public static String getFormatName()