jaga.pj.circuits.experiment
Class AndFunction

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

public class AndFunction
extends java.lang.Object
implements BooleanFunction

See Also:
Serialized Form

Constructor Summary
AndFunction()
          Creates new AndFunction
 
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 BitSets 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

AndFunction

public AndFunction()
Creates new AndFunction
Method Detail

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

getNumOfInputs

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

getTestData

public SampleData[] getTestData()
returns a set of BitSets providing a good set of input samples to test this function. This test looks like: (A B (DesQ)) 0 1 (0) 1 1 (1) 1 0 (0) 0 0 (0) 1 1 (1)
Specified by:
getTestData in interface BooleanFunction

setRandomSeed

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