|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjminhep.cluster.DataHolder
public class DataHolder
Represents an abstraction for a data holder in many dimensional space. All cluster operations are done using this holder
| Constructor Summary | |
|---|---|
DataHolder()
Creates a new empty instance of data holder |
|
DataHolder(DataPoint xMin,
DataPoint xMax,
int Dim,
int Size)
Creates data holder with random number Input: |
|
DataHolder(int dim)
Creates a new empty instance of data point |
|
DataHolder(String name)
Creates a new empty instance of data point |
|
| Method Summary | |
|---|---|
void |
add(DataPoint p)
Add a data point to the holder |
void |
add(double[] xx)
Add a new instance to data holder in form of array |
void |
analyseSet()
Analyse the data holder by calculating min and max. |
void |
clear()
Clear current data holder |
void |
fillRandom(DataPoint xMin,
DataPoint xMax,
int Dim,
int Size)
Fill an existing data holder with random numbers |
DataPoint[] |
getArray()
Get the data in form of Array |
ArrayList |
getArrayList()
Get all elements of the data holder in form of an ArrayList |
int |
getDimention()
Get the dimension of the data |
double[] |
getElement(int n)
Get array of elements at position n of the data holder |
DataPoint |
getMax()
Get Max values of the data |
DataPoint |
getMin()
Get Min values of the data holder |
String |
getName(int i)
Get name of the i-th attribute |
String |
getRelation()
Get name of the data holder (i.e. |
DataPoint |
getRow(int n)
Get DataPoint at the position n |
int |
getSize()
Get size of the data holder |
static void |
main(String[] args)
Main method -- to test the DataPoint class |
void |
print()
Print all entries of the data holder |
void |
read(String file)
Reads the input data from the ARFF file and stores in the data holder |
void |
setDimention(int Dim)
Set the dimension of the data |
void |
setName(int i,
String title)
Set the title for ith component |
void |
setRelation(String s)
Set relation (name) of the data holder |
String |
toString()
Convert to string all entries of the data holder |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataHolder()
public DataHolder(int dim)
dim - dimensionpublic DataHolder(String name)
name - Name of this data holder
public DataHolder(DataPoint xMin,
DataPoint xMax,
int Dim,
int Size)
xMin - min number of DataPointxMax - max number of DataPointDim - integer dimension of DataPointSize - number of rows| Method Detail |
|---|
public void fillRandom(DataPoint xMin,
DataPoint xMax,
int Dim,
int Size)
xMin - Min DataPointxMax - Max DataPointDim - Dimension of DataPointSize - Number of rowspublic ArrayList getArrayList()
public DataPoint[] getArray()
public void clear()
public void add(DataPoint p)
p - New pointpublic void setRelation(String s)
s - name to be setpublic void add(double[] xx)
xx - arraypublic void read(String file)
public int getDimention()
public void setDimention(int Dim)
Dim - dimensionpublic void analyseSet()
public DataPoint getMin()
public DataPoint getMax()
public int getSize()
public String getRelation()
public String getName(int i)
public void setName(int i,
String title)
i - Index of a componenttitle - New titlepublic double[] getElement(int n)
public DataPoint getRow(int n)
public void print()
public String toString()
toString in class Objectpublic static void main(String[] args)
args - command line arguments
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||