kohonen
Class LearningData

java.lang.Object
  extended by kohonen.LearningData
All Implemented Interfaces:
LearningDataModel

public class LearningData
extends java.lang.Object
implements LearningDataModel

Obiect containing learning data. Data are stored as array with double values.


Constructor Summary
LearningData(java.lang.String fileName)
          Creates a new instance of LearningData.
 
Method Summary
 double[] getData(int index)
          Return ArrayList as vector of data
 int getDataSize()
          Return numbers of data
 int getVectorSize()
          Return length of the vector
 java.lang.String toString()
          Return a string representation of the data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LearningData

public LearningData(java.lang.String fileName)
Creates a new instance of LearningData. Import data from file.

Parameters:
fileName - path to the file with data
Method Detail

getData

public double[] getData(int index)
Return ArrayList as vector of data

Specified by:
getData in interface LearningDataModel
Parameters:
index - index of data
Returns:
data vector

toString

public java.lang.String toString()
Return a string representation of the data. [value, value, ... ]

Specified by:
toString in interface LearningDataModel
Overrides:
toString in class java.lang.Object
Returns:
string representation of the data

getDataSize

public int getDataSize()
Return numbers of data

Specified by:
getDataSize in interface LearningDataModel
Returns:
numbers of data

getVectorSize

public int getVectorSize()
Return length of the vector

Returns:
Return length of the vector