com.rapidminer.example.table
Class SparseMapDataRow

java.lang.Object
  extended by com.rapidminer.example.table.DataRow
      extended by com.rapidminer.example.table.SparseMapDataRow
All Implemented Interfaces:
java.io.Serializable

public class SparseMapDataRow
extends DataRow

Implementation of DataRow that is backed by a HashMap. Usually using the DoubleSparseArrayDataRow should be more efficient.

Author:
Ingo Mierswa Exp $
See Also:
Serialized Form

Constructor Summary
SparseMapDataRow()
           
 
Method Summary
protected  void ensureNumberOfColumns(int numberOfColumns)
          Does nothing.
protected  double get(int index, double defaultValue)
          Returns the desired data for the given index.
protected  void set(int index, double value, double defaultValue)
          Sets the given data for the given index.
 java.lang.String toString()
          Returns a string representation of the data row.
 void trim()
          Does nothing.
 
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

SparseMapDataRow

public SparseMapDataRow()
Method Detail

get

protected double get(int index,
                     double defaultValue)
Returns the desired data for the given index.

Specified by:
get in class DataRow

set

protected void set(int index,
                   double value,
                   double defaultValue)
Sets the given data for the given index.

Specified by:
set in class DataRow

ensureNumberOfColumns

protected void ensureNumberOfColumns(int numberOfColumns)
Does nothing.

Specified by:
ensureNumberOfColumns in class DataRow

trim

public void trim()
Does nothing.

Specified by:
trim in class DataRow

toString

public java.lang.String toString()
Returns a string representation of the data row.

Specified by:
toString in class DataRow


Copyright © 2001-2009 by Rapid-I