at.tuwien.ifs.somtoolbox.data
Interface TemplateVector

All Known Implementing Classes:
AbstractSOMLibTemplateVector, DataBaseSOMLibTemplateVector, SOMLibTemplateVector, VectorFile2DatabaseImporter.TemplateVectorImporter

public interface TemplateVector

The template vector provides the attribute structure of the input vectors used for the training process of a Self-Organizing Map. It is usually written by a parser or vector generator program creating the vector structure.

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

Field Summary
static String templateFileNameSuffix
           
 
Method Summary
 boolean containsLabel(String label)
          tests whether there is a feature/attribute with the given label
 int dim()
          Gets the dimension.
 TemplateVectorElement getElement(int index)
          returns the template vector element for the feature/attribute at the given position
 int getIndexOfFeature(String label)
          Returns the numerical index of the feature with the given name.
 String getLabel(int i)
          Gets the label at the given index.
 String[] getLabels()
          Gets all the labels defined in this template vector.
 ArrayList<String> getLabelsAsList()
          Gets all the labels defined in this template vector as a list.
 int getLongestStringLength()
          calculates the length of the longest feature/attribute label
 void incNumVectors(int numVectors)
          Increase the num-vectors counter, used e.g.
 int numinfo()
          Returns how many columns the template vector contains, i.e.
 int numVectors()
          Return how many vectors are in the input vector file associated with this template vector
 

Field Detail

templateFileNameSuffix

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

dim

int dim()
Gets the dimension.

Returns:
the dimension of the template vector, i.e. the number of attributes

getLabel

String getLabel(int i)
Gets the label at the given index.

Returns:
the name of the label at the given index

getLabels

String[] getLabels()
Gets all the labels defined in this template vector.


getLabelsAsList

ArrayList<String> getLabelsAsList()
Gets all the labels defined in this template vector as a list.


containsLabel

boolean containsLabel(String label)
tests whether there is a feature/attribute with the given label


getIndexOfFeature

int getIndexOfFeature(String label)
Returns the numerical index of the feature with the given name.


numVectors

int numVectors()
Return how many vectors are in the input vector file associated with this template vector


numinfo

int numinfo()
Returns how many columns the template vector contains, i.e. the $XDIM.


getElement

TemplateVectorElement getElement(int index)
returns the template vector element for the feature/attribute at the given position


getLongestStringLength

int getLongestStringLength()
calculates the length of the longest feature/attribute label


incNumVectors

void incNumVectors(int numVectors)
Increase the num-vectors counter, used e.g. when merging input files in SOMLibInputMerger .