jaga.pj.circuits.experiment
Class ManCarAddFunction
java.lang.Object
|
+--jaga.pj.circuits.experiment.ManCarAddFunction
- All Implemented Interfaces:
- BooleanFunction, java.io.Serializable
- public class ManCarAddFunction
- extends java.lang.Object
- implements BooleanFunction
Some function is an arbitrary boolean function of 3 inputs (A,B,C,D)
where Q = ~( ~( A ^ B ) ^ C ) & D
(btw this is output of manchester carry adder with enable D)
- See Also:
- Serialized Form
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 |
ManCarAddFunction
public ManCarAddFunction()
- Creates new SomeFunction
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
- Specified by:
getTestData
in interface BooleanFunction
setRandomSeed
public void setRandomSeed(long seed)
- Specified by:
setRandomSeed
in interface BooleanFunction