📄 threeinputfunction.java~
字号:
/*
* ThreeInputFunction.java
*
* Created on 08 December 2001, 15:32
*/
package jaga.pj.circuits.experiment;
import jaga.SampleData;
import jaga.experiment.ExperimentLib;
/**
*
* @author Michael Garvie
* @version
*/
public class ThreeInputFunction implements BooleanFunction {
/** Creates new ThreeInputFunction */
public ThreeInputFunction() {
}
/** returns the result of this function given the inputs in the array
* @param inputs what values the inputs to the function have
*/
public boolean getResult(boolean[] inputs)
{
return ( inputs[ 0 ] & inputs[ 1 ] ) | inputs[ 2 ];
}
/** returns the amount of inputs needed to compute this function
*/
public int getNumOfInputs()
{
return 3;
}
/** returns a set of SampleDatas providing a good set of input samples
* to test this function
*/
public SampleData[] getTestData()
{
return null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -