public class SARSData
extends java.lang.Object
SARSData.SARS) tuples. The dataset is backed by an ArrayList.| Modifier and Type | Class and Description | 
|---|---|
static class  | 
SARSData.SARS
State-action-reward-state tuple. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
java.util.List<SARSData.SARS> | 
dataset
The underlying list of  
SARSData.SARS tuples. | 
| Constructor and Description | 
|---|
SARSData()
Initializes with an empty dataset 
 | 
SARSData(int initialCapacity)
Initializes with an empty dataset with initial capacity for the given parameter available. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
add(SARSData.SARS sars)
Adds the given  
SARSData.SARS tuple. | 
void | 
add(State s,
   Action a,
   double r,
   State sp)
Adds a  
SARSData.SARS tuple with the given component. | 
void | 
clear()
Clears this dataset of all elements. 
 | 
SARSData.SARS | 
get(int i)
Returns the  
SARSData.SARS tuple for the ith dataset element. | 
void | 
remove(int i)
Removes the  
SARSData.SARS tuple at the ith index | 
int | 
size()
The number of SARS tuples stored. 
 | 
public java.util.List<SARSData.SARS> dataset
SARSData.SARS tuples.public SARSData()
public SARSData(int initialCapacity)
initialCapacity - the initial capacity of the dataset.public int size()
public SARSData.SARS get(int i)
SARSData.SARS tuple for the ith dataset element.i - the index of the datasetSARSData.SARS tuple.public void add(SARSData.SARS sars)
SARSData.SARS tuple.sars - SARSData.SARS tuple to add.public void add(State s, Action a, double r, State sp)
SARSData.SARS tuple with the given component.s - the previous statea - the action taken in the previous stater - the resulting reward receivedsp - the next statepublic void remove(int i)
SARSData.SARS tuple at the ith indexi - the index of SARSData.SARS tuple to remove.public void clear()