Trait snarkvm_circuit::Ternary
source · pub trait Ternary {
type Boolean;
type Output;
// Required method
fn ternary(
condition: &Self::Boolean,
first: &Self,
second: &Self
) -> Self::Output
where Self: Sized;
}
Expand description
Trait for ternary operations.
Required Associated Types§
Required Methods§
Trait Implementations§
source§impl<E> Metrics<dyn Ternary<Boolean = Boolean<E>, Output = Address<E>>> for Address<E>where
E: Environment,
impl<E> Metrics<dyn Ternary<Boolean = Boolean<E>, Output = Address<E>>> for Address<E>where E: Environment,
source§impl<E> Metrics<dyn Ternary<Boolean = Boolean<E>, Output = Field<E>>> for Field<E>where
E: Environment,
impl<E> Metrics<dyn Ternary<Boolean = Boolean<E>, Output = Field<E>>> for Field<E>where E: Environment,
source§impl<E> Metrics<dyn Ternary<Boolean = Boolean<E>, Output = Group<E>>> for Group<E>where
E: Environment,
impl<E> Metrics<dyn Ternary<Boolean = Boolean<E>, Output = Group<E>>> for Group<E>where E: Environment,
source§impl<E, I> Metrics<dyn Ternary<Boolean = Boolean<E>, Output = Integer<E, I>>> for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E, I> Metrics<dyn Ternary<Boolean = Boolean<E>, Output = Integer<E, I>>> for Integer<E, I>where E: Environment, I: IntegerType,
source§impl<E> OutputMode<dyn Ternary<Boolean = Boolean<E>, Output = Address<E>>> for Address<E>where
E: Environment,
impl<E> OutputMode<dyn Ternary<Boolean = Boolean<E>, Output = Address<E>>> for Address<E>where E: Environment,
source§impl<E> OutputMode<dyn Ternary<Boolean = Boolean<E>, Output = Field<E>>> for Field<E>where
E: Environment,
impl<E> OutputMode<dyn Ternary<Boolean = Boolean<E>, Output = Field<E>>> for Field<E>where E: Environment,
source§impl<E> OutputMode<dyn Ternary<Boolean = Boolean<E>, Output = Group<E>>> for Group<E>where
E: Environment,
impl<E> OutputMode<dyn Ternary<Boolean = Boolean<E>, Output = Group<E>>> for Group<E>where E: Environment,
source§impl<E, I> OutputMode<dyn Ternary<Boolean = Boolean<E>, Output = Integer<E, I>>> for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E, I> OutputMode<dyn Ternary<Boolean = Boolean<E>, Output = Integer<E, I>>> for Integer<E, I>where E: Environment, I: IntegerType,
type Case = (CircuitType<Boolean<E>>, Mode, Mode)
source§fn output_mode(
case: &<Integer<E, I> as OutputMode<dyn Ternary<Boolean = Boolean<E>, Output = Integer<E, I>>>>::Case
) -> Mode
fn output_mode( case: &<Integer<E, I> as OutputMode<dyn Ternary<Boolean = Boolean<E>, Output = Integer<E, I>>>>::Case ) -> Mode
Returns the mode of the output.