IMPLIES
Download Flojoy Studio to try this app
Takes two boolean data type and computs logical IMPLIES operation on them. x implies y Params: x : Boolean The input boolean to which we apply the IMPLIES operation. y : Boolean The input boolean to which we apply the IMPLIES operation. Returns: out : Boolean The boolean result from the operation of the inputs.
Python Code
from flojoy import flojoy, Boolean
@flojoy
def IMPLIES(x: Boolean, y: Boolean) -> Boolean:
"""Takes two boolean data type and computs logical IMPLIES operation on them.
x implies y
Parameters
----------
x : Boolean
The input boolean to which we apply the IMPLIES operation.
y : Boolean
The input boolean to which we apply the IMPLIES operation.
Returns
-------
Boolean
The boolean result from the operation of the inputs.
"""
if x.b and not y.b:
return Boolean(b=False)
return Boolean(b=True)
Example App
Having problems with this example app? Join our Discord community and we will help you out!
In this example, BOOLEAN
node generates false and BOOLEAN1
node generates true. Connect BOOLEAN
node with y input and BOOLEAN1
node with x input.
Apply IMPLIES
operation on them (x implies y). Visualize the result using TEXT_VIEW
node.