pub enum Logic {
And,
Or,
Nand,
Nor,
Not,
If,
Input(u16),
}Expand description
The primitives of the Boolean problems: Koza’s (1992) functions, and the inputs.
If takes three arguments and returns the second if the first is true, else the third;
the others are the usual Boolean functions. Each problem’s set holds the functions of its
paper and its inputs, by name (a0, d0, …).
Variants§
And
a ∧ b.
Or
a ∨ b.
Nand
¬(a ∧ b).
Nor
¬(a ∨ b).
Not
¬a.
If
b if a, else c.
Input(u16)
The input at this position of the problem’s inputs.
Implementations§
Trait Implementations§
impl Copy for Logic
Source§impl<'de> Deserialize<'de> for Logic
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Logic
Available on crate feature
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Logic
impl StructuralPartialEq for Logic
Auto Trait Implementations§
impl Freeze for Logic
impl RefUnwindSafe for Logic
impl Send for Logic
impl Sync for Logic
impl Unpin for Logic
impl UnsafeUnpin for Logic
impl UnwindSafe for Logic
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more