public class DataHolder extends Object implements Serializable
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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
|
public DataHolder()
public DataHolder(int dim)
dim
- dimensionpublic DataHolder(String name)
name
- Name of this data holderpublic 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()
public static void main(String[] args)
args
- command line argumentsJas4pp 1.5 © Java Analysis Studio for Particle Physics