public final class TableAccessor extends Object
Table, using a preferred variable ordering, as opposed to the default sorted order specified in Table.getSortedVariables().TableIterator, 
Table| Constructor and Description | 
|---|
TableAccessor(Table table,
             List<Variable> order,
             List<Integer> times)
Initializes a new instance of the  
TableAccessor class, allowing random access to [table] with a specified [order] for the variables at specified times. | 
TableAccessor(Table table,
             List<VariableContext> order)
Initializes a new instance of the  
TableAccessor class, allowing random access to [table] with a specified [order] for the variables. | 
TableAccessor(Table table,
             Node[] order)
Initializes a new instance of the  
TableAccessor class, allowing random access to [table] with a specified [order] for the node variables. | 
TableAccessor(Table table,
             Node[] order,
             Integer[] times)
Initializes a new instance of the  
TableAccessor class, allowing random access to [table] with a specified [order] for the node variables. | 
TableAccessor(Table table,
             Variable[] order)
Initializes a new instance of the  
TableAccessor class, allowing random access to [table] with a specified [order] for the variables. | 
TableAccessor(Table table,
             Variable[] order,
             Integer[] times)
Initializes a new instance of the  
TableAccessor class, allowing random access to [table] with a specified [order] for the variables at specified times. | 
TableAccessor(Table table,
             VariableContextCollection order)
Initializes a new instance of the  
TableAccessor class, allowing random access to [table] with a specified [order] for the variables. | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
copyFrom(double[] values)
Copies values from an array into the underlying  
Table using the variable ordering of the TableAccessor, not the Table.getSortedVariables(). | 
double | 
get(int i)
Gets the underlying  
Table value, specified i. | 
double | 
get(int[] states)
Gets the underlying  
Table value, using states corresponding to the order of variables in the TableAccessor. | 
int | 
getRow(int[] states)
Gets the  
TableAccessor row for the given states. | 
int | 
getState(int i,
        int node)
Gets the state at the given position [i] for the node given by [node]. 
 | 
void | 
getStates(int i,
         int[] states)
Gets the states at the given position [i]. 
 | 
Table | 
getTable()
Gets the underlying  
Table. | 
int | 
getTableIndex(int i)
Gets the equivalent index in the underlying table that corresponds to the index in the accessor. 
 | 
void | 
set(int[] states,
   double value)
Sets the underlying  
Table value, using states corresponding to the order of variables in the TableAccessor. | 
void | 
set(int i,
   double value)
Sets the underlying  
Table value, specified i. | 
int | 
size()
Gets the count of values in the underlying  
Table. | 
public TableAccessor(Table table, Variable[] order)
TableAccessor class, allowing random access to [table] with a specified [order] for the variables.table - The table whose values are to be accessed.order - The order in which the variables should be accessed.  The last variable's states toggle fastest.NullPointerException - Raised if either [table] or [order] is null.IllegalArgumentException - Raised if order does not contain the same variables as [table].TableIteratorpublic TableAccessor(Table table, List<VariableContext> order)
TableAccessor class, allowing random access to [table] with a specified [order] for the variables.table - The table whose values are to be accessed.order - The order in which the variables should be accessed, defined using variable contexts.  The last variable's states toggle fastest.NullPointerException - Raised if either [table] or [order] is null.IllegalArgumentException - Raised if order does not contain the same variables as [table].TableIteratorpublic TableAccessor(Table table, VariableContextCollection order)
TableAccessor class, allowing random access to [table] with a specified [order] for the variables.  Any times that are contained within the VariableContextCollection will be used.table - The table whose values are to be accessed.order - The order in which the variables should be accessed, including any timing information contained in the VariableContextCollection.  The last variable's states toggle fastest.NullPointerException - Raised if either [table] or [order] is null.IllegalArgumentException - Raised if order does not contain the same variables as [table].public TableAccessor(Table table, Node[] order, Integer[] times)
TableAccessor class, allowing random access to [table] with a specified [order] for the node variables.table - The table whose values are to be accessed.order - The order in which the node variables should be accessed.  The last variable's states toggle fastest.times - The times for the node variables.NullPointerException - Raised if either [table] or [order] is null.IllegalArgumentException - Raised if the nodes in order do not contain the same variables as [table].public TableAccessor(Table table, Variable[] order, Integer[] times)
TableAccessor class, allowing random access to [table] with a specified [order] for the variables at specified times.table - The table whose values are to be accessed.order - The order in which the variables should be accessed.  The last variable's states toggle fastest.times - The times for the variables.NullPointerException - Raised if either [table] or [order] is null.IllegalArgumentException - Raised if order does not contain the same variables as [table].public TableAccessor(Table table, List<Variable> order, List<Integer> times)
TableAccessor class, allowing random access to [table] with a specified [order] for the variables at specified times.table - The table whose values are to be accessed.order - The order in which the variables should be accessed.  The last variable's states toggle fastest.times - The times for the variables.NullPointerException - Raised if either [table] or [order] is null.IllegalArgumentException - Raised if order does not contain the same variables as [table].public TableAccessor(Table table, Node[] order)
TableAccessor class, allowing random access to [table] with a specified [order] for the node variables.table - The table whose values are to be accessed.order - The order in which the node variables should be accessed.  The last variable's states toggle fastest.NullPointerException - Raised if either [table] or [order] is null.IllegalArgumentException - Raised if the nodes in order do not contain the same variables as [table].TableIteratorpublic void copyFrom(double[] values)
Table using the variable ordering of the TableAccessor, not the Table.getSortedVariables().values - An array of values to copy.NullPointerException - Raised if [values] is null.IllegalArgumentException - Raised if [values] is too short.public int size()
Table.public double get(int[] states)
Table value, using states corresponding to the order of variables in the TableAccessor.Table value.public void set(int[] states,
                double value)
Table value, using states corresponding to the order of variables in the TableAccessor.value - The underlying Table value.public double get(int i)
Table value, specified i.public void set(int i,
                double value)
Table value, specified i.value - The table value.public void getStates(int i,
                      int[] states)
TableAccessor.i - The position at which to retrieve the states.states - A buffer for the states, which is overwritten by the method.NullPointerException - Raised if [states] is null.IllegalArgumentException - Raised if [states] is too short.public int getRow(int[] states)
TableAccessor row for the given states.  The row is relative to the specified variable ordering in the TableAccessor.states - The states.TableAccessor.NullPointerException - [states] is null.IllegalArgumentException - [states] length does not equal the number of variables in the TableAccessor.public int getState(int i,
                    int node)
TableAccessor.i - The position at which to retrieve the state.node - The node.public int getTableIndex(int i)
i - The accessor index.Copyright © 2021. All rights reserved.