Class logic.BooleanTupleFactory
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class logic.BooleanTupleFactory

Object
   |
   +----logic.BooleanTupleFactory

public class BooleanTupleFactory
extends Object

Constructor Index

 o logic.BooleanTupleFactory()

Method Index

 o loadTuples(String, Algorithm_fewStars, Action)
This method generates the array of BooleanTuples that is generated from the boolean String tf (like "TT**F") -- a String that may contain '*'s.

Constructors

 o BooleanTupleFactory
public BooleanTupleFactory()

Methods

 o loadTuples
public static void loadTuples(String tf,
                              Algorithm_fewStars alg,
                              Action action) throws PoorPerformanceException, InconsistentRulesException
This method generates the array of BooleanTuples that is generated from the boolean String tf (like "TT**F") -- a String that may contain '*'s. We first generate all possible boolean strings that don't have stars, then convert to BooleanTuples.

For example, if tf is "TT**F", this method first generates an array of four non-star boolean Strings as follows:

     0:  "TTTTF"
     1:  "TTTFF"
     2:  "TTFTF"
     3:  "TTFFF"
  
These four rows are thought of as a 2-d array; the 0th "column" in this example would be
     T
     T
     T
     T
  
In order to fill in the '*'s with all possible T's and F's, we use the truthTable(..) method. NOTE: Error handling is not being done in case conversion fails for some reason.


All Packages  Class Hierarchy  This Package  Previous  Next  Index