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.
Returns first
if condition
is true
, otherwise returns second
.
Returns the number of constants, public inputs, private inputs, and constraints.
Returns the number of constants, public inputs, private inputs, and constraints.
Returns the number of constants, public inputs, private inputs, and constraints.
Returns the number of constants, public inputs, private inputs, and constraints.
Returns the mode of the output.
Returns the mode of the output.
Returns the mode of the output.
Returns the mode of the output.
Returns first
if condition
is true
, otherwise returns second
.
Returns first
if condition
is true
, otherwise returns second
.
Returns first
if condition
is true
, otherwise returns second
.
Returns first
if condition
is true
, otherwise returns second
.
Returns first
if condition
is true
, otherwise returns second
.
Returns first
if condition
is true
, otherwise returns second
.
Returns first
if condition
is true
, otherwise returns second
.
Returns first
if condition
is true
, otherwise returns second
.