jaga.pj.circuits.experiment
Class TableBooleanFunction

java.lang.Object
  |
  +--jaga.pj.circuits.experiment.TableBooleanFunction
All Implemented Interfaces:
BooleanFunction, java.io.Serializable

public class TableBooleanFunction
extends java.lang.Object
implements BooleanFunction

First input defines MSB of table address

See Also:
Serialized Form

Constructor Summary
TableBooleanFunction(int nrInputs, boolean[] table)
          Creates a new instance of TableBooleanFunction
TableBooleanFunction(int nrInputs, boolean[] table, TestPatternGenerator tpg)
           
 
Method Summary
 int getNumOfInputs()
          returns the amount of inputs needed to compute this function
 boolean getResult(boolean[] inputs)
          returns the result of this function given the inputs in the array
 SampleData[] getTestData()
          returns a set of SampleDatas providing a good set of input samples to test this function
 void setRandomSeed(long seed)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableBooleanFunction

public TableBooleanFunction(int nrInputs,
                            boolean[] table,
                            TestPatternGenerator tpg)

TableBooleanFunction

public TableBooleanFunction(int nrInputs,
                            boolean[] table)
Creates a new instance of TableBooleanFunction
Method Detail

getNumOfInputs

public int getNumOfInputs()
returns the amount of inputs needed to compute this function
Specified by:
getNumOfInputs in interface BooleanFunction

getResult

public boolean getResult(boolean[] inputs)
returns the result of this function given the inputs in the array
Specified by:
getResult in interface BooleanFunction
Parameters:
inputs - what values the inputs to the function have

getTestData

public SampleData[] getTestData()
returns a set of SampleDatas providing a good set of input samples to test this function
Specified by:
getTestData in interface BooleanFunction

setRandomSeed

public void setRandomSeed(long seed)
Specified by:
setRandomSeed in interface BooleanFunction