public final class BooleanAlgebra
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static double[][] |
AND_TRUTH_TABLE
AND truth table
|
static double[][] |
CIMP_TRUTH_TABLE
CIMP truth table
|
static double[][] |
CNIMP_TRUTH_TABLE
CNIMP truth table
|
static double[][] |
EQV_TRUTH_TABLE
EQV truth table
|
static double |
F
False as double
|
static int |
FALSE
False as integer
|
static double[][] |
IMP_TRUTH_TABLE
IMP truth table
|
static double |
N
Null as double
|
static double[][] |
NAND_TRUTH_TABLE
NAND truth table
|
static double[][] |
NIMP_TRUTH_TABLE
NIMP truth table
|
static double[][] |
NOR_TRUTH_TABLE
NOR truth table
|
static double[] |
NOT_TRUTH_TABLE
NOT truth table
|
static int |
NULL
Null as integer
|
static double[][] |
OR_TRUTH_TABLE
OR truth table
|
static double |
T
True as double
|
static int |
TRUE
True as integer
|
static double[][] |
XNOR_TRUTH_TABLE
XNOR truth table
|
static double[][] |
XOR_TRUTH_TABLE
XOR truth table
|
Constructor and Description |
---|
BooleanAlgebra() |
Modifier and Type | Method and Description |
---|---|
static double |
and(double a,
double b)
Boolean AND
|
static double |
andVariadic(double[] values)
Boolean AND variadic
|
static double |
cimp(double a,
double b)
Boolean CIMP
|
static double |
cnimp(double a,
double b)
Boolean CNIMP
|
static int |
double2IntBoolean(double a)
Double to integer boolean translation
|
static double |
eqv(double a,
double b)
Boolean EQV
|
static double |
imp(double a,
double b)
Boolean IMP
|
static double |
nand(double a,
double b)
Boolean NAND
|
static double |
nimp(double a,
double b)
Boolean NIMP
|
static double |
nor(double a,
double b)
Boolean NOR
|
static double |
not(double a)
Boolean NOT
|
static double |
or(double a,
double b)
Boolean OR
|
static double |
orVariadic(double[] values)
Boolean OR variadic
|
static double |
xnor(double a,
double b)
Boolean XNOR
|
static double |
xor(double a,
double b)
Boolean XOR
|
static double |
xorVariadic(double[] values)
Boolean XOR variadic
|
public static final int FALSE
public static final int TRUE
public static final int NULL
public static final double F
public static final double T
public static final double N
public static final double[][] AND_TRUTH_TABLE
public static final double[][] NAND_TRUTH_TABLE
public static final double[][] OR_TRUTH_TABLE
public static final double[][] NOR_TRUTH_TABLE
public static final double[][] XOR_TRUTH_TABLE
public static final double[][] XNOR_TRUTH_TABLE
public static final double[][] IMP_TRUTH_TABLE
public static final double[][] CIMP_TRUTH_TABLE
public static final double[][] EQV_TRUTH_TABLE
public static final double[][] NIMP_TRUTH_TABLE
public static final double[][] CNIMP_TRUTH_TABLE
public static final double[] NOT_TRUTH_TABLE
public static final int double2IntBoolean(double a)
a
- the double numberpublic static final double and(double a, double b)
a
- the a number (a AND b)b
- the b number (a AND b)public static final double or(double a, double b)
a
- the a number (a OR b)b
- the b number (a OR b)public static final double xor(double a, double b)
a
- the a number (a XOR b)b
- the b number (a XOR b)public static final double nand(double a, double b)
a
- the a number (a NAND b)b
- the b number (a NAND b)public static final double nor(double a, double b)
a
- the a number (a NOR b)b
- the b number (a NOR b)public static final double xnor(double a, double b)
a
- the a number (a XNOR b)b
- the b number (a XNOR b)public static final double imp(double a, double b)
a
- the a number (a IMP b)b
- the b number (a IMP b)public static final double eqv(double a, double b)
a
- the a number (a EQV b)b
- the b number (a EQV b)public static final double not(double a)
a
- the a number (NOT a)public static final double cimp(double a, double b)
a
- the a number (a CIMP b)b
- the b number (a CIMP b)public static final double nimp(double a, double b)
a
- the a number (a NIMP b)b
- the b number (a NIMP b)public static final double cnimp(double a, double b)
a
- the a number (a CNIMP b)b
- the b number (a CNIMP b)public static final double andVariadic(double[] values)
values
- List of valuespublic static final double orVariadic(double[] values)
values
- List of valuespublic static final double xorVariadic(double[] values)
values
- List of values