com.rapidminer.example.set
Class HeaderExampleSet

java.lang.Object
  extended by com.rapidminer.operator.AbstractIOObject
      extended by com.rapidminer.operator.ResultObjectAdapter
          extended by com.rapidminer.example.set.AbstractExampleSet
              extended by com.rapidminer.example.set.HeaderExampleSet
All Implemented Interfaces:
ExampleSet, IOObject, ResultObject, Saveable, LoggingHandler, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Example>

public class HeaderExampleSet
extends AbstractExampleSet

This example set is a clone of the attributes without reference to any data. Therefore it can be used as a data header description. Since no data reference exist, all example based methods will throw an UnsupportedOperationException.

Author:
Ingo Mierswa
See Also:
Serialized Form

Constructor Summary
HeaderExampleSet(ExampleSet parent)
           
HeaderExampleSet(HeaderExampleSet other)
          Header example set clone constructor.
 
Method Summary
 Attributes getAttributes()
          Returns the data structure holding all attributes.
 Example getExample(int index)
          Returns the i-th example.
 Example getExampleFromId(double value)
          Returns the example with the given id value.
 ExampleTable getExampleTable()
          Returns the underlying example table.
 java.util.Iterator<Example> iterator()
           
 void remapIds()
          Remaps all ids.
 int size()
          Returns the number of examples in this example set.
 
Methods inherited from class com.rapidminer.example.set.AbstractExampleSet
clone, copy, createDataTable, equals, getActions, getExampleIndicesFromId, getExtension, getFileDescription, getName, getResultIcon, getStatistics, getStatistics, getVisualizationComponent, getVisualizationComponent, hashCode, recalculateAllAttributeStatistics, recalculateAttributeStatistics, toString, writeAttributeFile, writeDataFile, writeSparseAttributeFile, writeSparseDataFile
 
Methods inherited from class com.rapidminer.operator.ResultObjectAdapter
addAction, isSavable, log, logError, logNote, logWarning, save, toHTML, toResultString
 
Methods inherited from class com.rapidminer.operator.AbstractIOObject
getLog, getSource, initWriting, read, setLoggingHandler, setSource, write
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.operator.ResultObject
toResultString
 
Methods inherited from interface com.rapidminer.operator.IOObject
getLog, getSource, setLoggingHandler, setSource, write
 

Constructor Detail

HeaderExampleSet

public HeaderExampleSet(ExampleSet parent)

HeaderExampleSet

public HeaderExampleSet(HeaderExampleSet other)
Header example set clone constructor.

Method Detail

getAttributes

public Attributes getAttributes()
Description copied from interface: ExampleSet
Returns the data structure holding all attributes.


getExample

public Example getExample(int index)
Description copied from interface: ExampleSet
Returns the i-th example. It is not guaranteed that asking for an example by using the index in the example table is efficiently implemented. Therefore for-loops for iterations are not an option and an ExampleReader should be used.


getExampleFromId

public Example getExampleFromId(double value)
Description copied from interface: ExampleSet
Returns the example with the given id value. If the example set does not contain an id attribute this method should return null.

Specified by:
getExampleFromId in interface ExampleSet
Overrides:
getExampleFromId in class AbstractExampleSet

getExampleTable

public ExampleTable getExampleTable()
Description copied from interface: ExampleSet
Returns the underlying example table. Most operators should operate on the example set and manipulate example to change table data instead of using the table directly.


remapIds

public void remapIds()
Description copied from interface: ExampleSet
Remaps all ids. This method should be invoked before the method ExampleSet.getExampleFromId(double) is used.

Specified by:
remapIds in interface ExampleSet
Overrides:
remapIds in class AbstractExampleSet

size

public int size()
Description copied from interface: ExampleSet
Returns the number of examples in this example set. This number should not be used to create for-loops to iterate through all examples.


iterator

public java.util.Iterator<Example> iterator()


Copyright © 2001-2009 by Rapid-I