distribute#
- tangles.util.logic.distribute(value: ndarray, term: ndarray) ndarray #
If the input is in CNF, calculates
termA or termB.
If the input is in DNF, calculates
termA and termB.
This is done by “multiplying” both “sums” using the distributive laws.
Parameters#
- value
a term, either in CNF or DNF.
- term
a term, in the same normal form.
Returns#
- np.ndarray
A term in the same normal form as the input terms.