quoggles
Class QAssign

java.lang.Object
  |
  +--quoggles.QAssign

public class QAssign
extends java.lang.Object

Holds static row assignment arrays.


Field Summary
private static boolean[] assignedBEPRows
          An entry at i is true if an BoolPredicateEnd_Box sets its output at row i.
private static boolean[] assignedRows
          An entry at i is true if an IOuputBox sets its output at row i.
 
Constructor Summary
QAssign()
           
 
Method Summary
static void assignBEPRow(int rowNr, boolean assign)
          Specifies that the given row number has been assigned by an IOutputBox or that it has been freed (depending on the boolean parameter).
static void assignRow(int rowNr, boolean assign)
          Specifies that the given row number has been assigned by an IOutputBox or that it has been freed (depending on the boolean parameter).
static boolean[] getAssignedBEPRowsCopy()
          This method may only be used to easily make a copy.
static boolean[] getAssignedRowsCopy()
          This method may only be used to easily make a copy.
static boolean getBEPRowAssignment(int rowNr)
          Returns true if the given row number has been assigned by a BoolPredicateEnd_Box.
static int getMaxAssignedBEPRowNr()
          Returns the highest possible row assignement number for BoolPredicateEnd_Boxes.
static int getMaxAssignedRowNr()
          Returns the highest possible row assignement number.
static int getNextFreeBEPRowNumber()
          Get the first row number that is not assigned to any BoolPredicateEnd_Box box, i.e.
static int getNextFreeRowNumber()
          Get the first row number that is not assigned to any IOutputBox box, i.e.
static boolean getRowAssignment(int rowNr)
          Returns true if the given row number has been assigned by an IOutputBox.
static void resetAssignedRows()
          Setes all entries in the assignedRows array to false.
static void setAssignedBEPRows(boolean[] ar)
          This method may only be used with a parameter previously retrieved via getAssignedBEPRowsCopy().
static void setAssignedRows(boolean[] ar)
          This method may only be used with a parameter previously retrieved via getAssignedRowsCopy().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

assignedRows

private static boolean[] assignedRows
An entry at i is true if an IOuputBox sets its output at row i.


assignedBEPRows

private static boolean[] assignedBEPRows
An entry at i is true if an BoolPredicateEnd_Box sets its output at row i.

Constructor Detail

QAssign

public QAssign()
Method Detail

getRowAssignment

public static boolean getRowAssignment(int rowNr)
Returns true if the given row number has been assigned by an IOutputBox.

Parameters:
rowNr -
Returns:
true if the given row number has been assigned by an IOutputBox

resetAssignedRows

public static void resetAssignedRows()
Setes all entries in the assignedRows array to false.


assignRow

public static void assignRow(int rowNr,
                             boolean assign)
Specifies that the given row number has been assigned by an IOutputBox or that it has been freed (depending on the boolean parameter).

Parameters:
rowNr -
assign -

getBEPRowAssignment

public static boolean getBEPRowAssignment(int rowNr)
Returns true if the given row number has been assigned by a BoolPredicateEnd_Box.

Parameters:
rowNr -
Returns:
true if the row with the given index has been assigned for a BoolPredicateEnd_Box

assignBEPRow

public static void assignBEPRow(int rowNr,
                                boolean assign)
Specifies that the given row number has been assigned by an IOutputBox or that it has been freed (depending on the boolean parameter).

Parameters:
rowNr -
assign -

getMaxAssignedRowNr

public static int getMaxAssignedRowNr()
Returns the highest possible row assignement number.

Returns:
the highest possible row assignement number

getMaxAssignedBEPRowNr

public static int getMaxAssignedBEPRowNr()
Returns the highest possible row assignement number for BoolPredicateEnd_Boxes.

Returns:
the highest possible row assignement number for BoolPredicateEnd_Boxes

getNextFreeRowNumber

public static int getNextFreeRowNumber()
Get the first row number that is not assigned to any IOutputBox box, i.e. the first number i where assignedRows[i] == false. Returns -1 if no such number can be found (overflow).

Returns:
-1 if no free number available.

getNextFreeBEPRowNumber

public static int getNextFreeBEPRowNumber()
Get the first row number that is not assigned to any BoolPredicateEnd_Box box, i.e. the first number i where assignedRows[i] == false. Returns -1 if no such number can be found (overflow).

Returns:
-1 if no free number available.

getAssignedRowsCopy

public static boolean[] getAssignedRowsCopy()
This method may only be used to easily make a copy. Use get / set methods for read / write access.

Returns:
copy of assigned rows array

getAssignedBEPRowsCopy

public static boolean[] getAssignedBEPRowsCopy()
This method may only be used to easily make a copy. Use get / set methods for read / write access.

Returns:
copy of assigned BEP rows array

setAssignedBEPRows

public static void setAssignedBEPRows(boolean[] ar)
This method may only be used with a parameter previously retrieved via getAssignedBEPRowsCopy().

Parameters:
ar - copy of assigned BEP rows array

setAssignedRows

public static void setAssignedRows(boolean[] ar)
This method may only be used with a parameter previously retrieved via getAssignedRowsCopy().

Parameters:
ar - copy of assigned BEP rows array