edu.udo.cs.yale.example
Class RandomExampleTable

java.lang.Object
  extended by edu.udo.cs.yale.example.AbstractExampleTable
      extended by edu.udo.cs.yale.example.RandomExampleTable
All Implemented Interfaces:
ExampleTable

public class RandomExampleTable
extends AbstractExampleTable

This class is used for example sets which should provide random values for the given attributes, i.e. each random value lies in the same range as values of the given attributes (min and max). Please note that the attributes must already have proper minimum and maximum values. The random values are constructed by a RandomDataRowReader.

Version:
$Id: RandomExampleTable.java,v 2.9 2006/04/05 08:57:22 ingomierswa Exp $
Author:
Ingo Mierswa

Field Summary
private  int size
           
 
Constructor Summary
RandomExampleTable(java.util.List<Attribute> attributes, int size)
           
 
Method Summary
 DataRowReader getDataReader()
          Returns an Iterator for example data given as DataRow objects.
 DataRow getDataRow(int index)
          Returns the i-th data row.
 int getSize()
          Returns the number of examples.
 
Methods inherited from class edu.udo.cs.yale.example.AbstractExampleTable
addAttribute, addAttributes, createCompleteExampleSet, createCompleteExampleSet, createCompleteExampleSet, createExampleSet, findAttribute, getAttribute, getAttribute, getAttributeCount, getAttributes, getBlockEndIndex, getHighestBlockNr, getNextFreeBlockNr, getNumberOfAttributes, removeAttribute, removeAttribute, toDataString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

size

private int size
Constructor Detail

RandomExampleTable

public RandomExampleTable(java.util.List<Attribute> attributes,
                          int size)
Method Detail

getDataReader

public DataRowReader getDataReader()
Description copied from class: AbstractExampleTable
Returns an Iterator for example data given as DataRow objects. This should be used in all cases where iteration is desired. Since AbstractExampleTable.getDataRow(int) does not ensure to work in an efficient way the usage of this method is preferred (instead using for-loops).

Specified by:
getDataReader in interface ExampleTable
Specified by:
getDataReader in class AbstractExampleTable


getDataRow

public DataRow getDataRow(int index)
Description copied from class: AbstractExampleTable
Returns the i-th data row. Calling methods cannot rely on the efficiency of this method. Memory based example tables should return the data row in O(1).

Specified by:
getDataRow in interface ExampleTable
Specified by:
getDataRow in class AbstractExampleTable


getSize

public int getSize()
Description copied from class: AbstractExampleTable
Returns the number of examples.

Specified by:
getSize in interface ExampleTable
Specified by:
getSize in class AbstractExampleTable



Copyright © 2001-2006