edu.uiuc.ge.illigal.gale.data
Class FoldView

java.lang.Object
  |
  +--edu.uiuc.ge.illigal.gale.data.FoldView
All Implemented Interfaces:
OrderedSet

public class FoldView
extends java.lang.Object
implements OrderedSet

This class is a folder view for cross-validation over a certain set

Since:
0.9alpha
Version:
0.9alpha
Author:
Xavier Llorà <xllora@illigal.ge.uiuc.edu>

Field Summary
private  edu.uiuc.ge.illigal.gale.data.Instance[] insa
          The array of instances
private  int iSize
          The number of instances in the view
 
Constructor Summary
FoldView(java.util.Vector vec, java.util.Random rnd)
          Builds a view over the vector given.
 
Method Summary
 edu.uiuc.ge.illigal.gale.data.Instance getInstance(int iPos)
          Returns the instance for the given position
 int getSize()
          Returns the number of instances in the OrderedSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

insa

private edu.uiuc.ge.illigal.gale.data.Instance[] insa
The array of instances


iSize

private int iSize
The number of instances in the view

Constructor Detail

FoldView

public FoldView(java.util.Vector vec,
                java.util.Random rnd)
Builds a view over the vector given.

Parameters:
vec - The ordered set that contains the data
rnd - The random number generator
Method Detail

getInstance

public edu.uiuc.ge.illigal.gale.data.Instance getInstance(int iPos)
Description copied from interface: OrderedSet
Returns the instance for the given position

Specified by:
getInstance in interface OrderedSet
Parameters:
iPos - Index of the requested instance
Returns:
The value of the requested index

getSize

public int getSize()
Description copied from interface: OrderedSet
Returns the number of instances in the OrderedSet

Specified by:
getSize in interface OrderedSet
Returns:
The number of instances