|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.datatable.AbstractDataTable
com.rapidminer.datatable.SimpleDataTable
public class SimpleDataTable
A simple data table implementation which stores the data itself.
| Constructor Summary | |
|---|---|
SimpleDataTable(java.lang.String name,
java.lang.String[] columns)
|
|
SimpleDataTable(java.lang.String name,
java.lang.String[] columns,
double[] weights)
|
|
| Method Summary | |
|---|---|
void |
add(DataTableRow row)
Adds the given DataTableRow to the table. |
void |
cleanMappingTables()
|
void |
clear()
|
int |
getColumnIndex(java.lang.String name)
Returns the column index of the column with the given name. |
java.lang.String |
getColumnName(int i)
Returns the name of the i-th column. |
java.lang.String[] |
getColumnNames()
Returns an array of all column names. |
double |
getColumnWeight(int column)
Returns the weight of the column or Double.NaN if no weight is available. |
int |
getNumberOfColumns()
Returns the total number of columns. |
int |
getNumberOfRows()
Returns the total number of rows. |
int |
getNumberOfSpecialColumns()
Returns the total number of special columns. |
int |
getNumberOfValues(int column)
Returns the number of different values for the i-th column. |
DataTableRow |
getRow(int index)
Returns the data table row with the given index. |
boolean |
isDate(int index)
Indicates if the column with the given index is nominal. |
boolean |
isDateTime(int index)
Indicates if the column with the given index is nominal. |
boolean |
isNominal(int column)
Indicates if the column with the given index is nominal. |
boolean |
isNumerical(int index)
Indicates if the column with the given index is nominal. |
boolean |
isSpecial(int index)
Returns true if this column is a special column which might usually not be used for some plotters, for example weights or labels. |
boolean |
isSupportingColumnWeights()
Returns true if this data table is supporting column weights. |
boolean |
isTime(int index)
Indicates if the column with the given index is nominal. |
java.util.Iterator<DataTableRow> |
iterator()
Returns an iterator over all DataTableRows. |
java.lang.String |
mapIndex(int column,
int index)
If a column is nominal, the index value must be mapped to the nominal value by this method. |
int |
mapString(int column,
java.lang.String value)
If a column is nominal, the nominal value must be mapped to a (new) index by this method. |
void |
remove(DataTableRow row)
|
DataTable |
sample(int newSize)
Performs a sampling of this data table. |
void |
setSpecial(int index,
boolean special)
|
java.lang.String |
toString()
Dumps the complete table into a string (complete data!). |
| Methods inherited from class com.rapidminer.datatable.AbstractDataTable |
|---|
addDataTableListener, containsMissingValues, finishReporting, fireEvent, getCell, getColumnNumber, getName, getRowNumber, getSelectionCount, getValueAsString, isDeselected, isFirstColumnHeader, isFirstLineHeader, prepareReporting, removeDataTableListener, setName, setSelection, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleDataTable(java.lang.String name,
java.lang.String[] columns)
public SimpleDataTable(java.lang.String name,
java.lang.String[] columns,
double[] weights)
| Method Detail |
|---|
public int getNumberOfSpecialColumns()
DataTableDataTable.isSpecial(int) should be used.
getNumberOfSpecialColumns in interface DataTablepublic boolean isSpecial(int index)
DataTable
isSpecial in interface DataTable
public void setSpecial(int index,
boolean special)
public boolean isNominal(int column)
DataTable
isNominal in interface DataTablepublic boolean isDate(int index)
DataTable
isDate in interface DataTablepublic boolean isTime(int index)
DataTable
isTime in interface DataTablepublic boolean isDateTime(int index)
DataTable
isDateTime in interface DataTablepublic boolean isNumerical(int index)
DataTable
isNumerical in interface DataTable
public java.lang.String mapIndex(int column,
int index)
DataTableNullPointerException.
mapIndex in interface DataTable
public int mapString(int column,
java.lang.String value)
DataTableNullPointerException.
mapString in interface DataTablepublic int getNumberOfValues(int column)
DataTable
getNumberOfValues in interface DataTablepublic void cleanMappingTables()
public boolean isSupportingColumnWeights()
DataTable
isSupportingColumnWeights in interface DataTablepublic double getColumnWeight(int column)
DataTable
getColumnWeight in interface DataTablepublic java.lang.String getColumnName(int i)
DataTable
getColumnName in interface DataTablegetColumnName in interface Tableablepublic int getColumnIndex(java.lang.String name)
DataTable
getColumnIndex in interface DataTablepublic int getNumberOfColumns()
DataTable
getNumberOfColumns in interface DataTablepublic java.lang.String[] getColumnNames()
DataTable
getColumnNames in interface DataTablegetColumnNames in class AbstractDataTablepublic void add(DataTableRow row)
DataTableDataTableRow to the table.
add in interface DataTablepublic void remove(DataTableRow row)
public DataTableRow getRow(int index)
DataTable
getRow in interface DataTablepublic java.util.Iterator<DataTableRow> iterator()
DataTableDataTableRows.
iterator in interface DataTableiterator in interface java.lang.Iterable<DataTableRow>public int getNumberOfRows()
DataTable
getNumberOfRows in interface DataTablepublic void clear()
public DataTable sample(int newSize)
DataTable
sample in interface DataTablepublic java.lang.String toString()
toString in class java.lang.Object
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||