|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.example.table.DataRow
com.rapidminer.example.table.AbstractSparseArrayDataRow
com.rapidminer.example.table.BooleanSparseArrayDataRow
public class BooleanSparseArrayDataRow
Implementation of DataRow that is backed by primitive arrays. Should always be used if more than 50% of the data is sparse. As fast (or even faster than map implementation) but needs considerably less memory. This implementation uses boolean arrays instead of double arrays which will reduce the used memory even more.
| Constructor Summary | |
|---|---|
BooleanSparseArrayDataRow()
Creates an empty sparse array data row with size 0. |
|
BooleanSparseArrayDataRow(int size)
Creates a sparse array data row of the given size. |
|
| Method Summary | |
|---|---|
protected double[] |
getAllValues()
|
double |
getValue(int index)
Returns the desired data for the given attribute. |
void |
removeValue(int index)
|
void |
resizeValues(int length)
|
void |
setValue(int index,
double v)
Sets the given data for the given attribute. |
protected void |
swapValues(int a,
int b)
Swaps x[a] with x[b]. |
| Methods inherited from class com.rapidminer.example.table.AbstractSparseArrayDataRow |
|---|
ensureNumberOfColumns, get, getNonDefaultIndices, getNonDefaultValues, set, swap, toString, trim |
| Methods inherited from class com.rapidminer.example.table.DataRow |
|---|
get, set |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BooleanSparseArrayDataRow()
public BooleanSparseArrayDataRow(int size)
| Method Detail |
|---|
protected void swapValues(int a,
int b)
swapValues in class AbstractSparseArrayDataRowpublic void resizeValues(int length)
resizeValues in class AbstractSparseArrayDataRowpublic void removeValue(int index)
removeValue in class AbstractSparseArrayDataRowpublic double getValue(int index)
getValue in class AbstractSparseArrayDataRow
public void setValue(int index,
double v)
setValue in class AbstractSparseArrayDataRowprotected double[] getAllValues()
getAllValues in class AbstractSparseArrayDataRow
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||