jaga.pj.circuits.experiment
Class XOrFunction

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

public class XOrFunction
extends java.lang.Object
implements BooleanFunction

See Also:
Serialized Form

Constructor Summary
XOrFunction()
          Creates new XOrFunction
 
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)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XOrFunction

public XOrFunction()
Creates new XOrFunction
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()
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. Test looks like: A B (DesQ) 1 0 (0) 0 0 (1) 0 1 (0) 1 1 (1)
Specified by:
getTestData in interface BooleanFunction

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setRandomSeed

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