PositionalInputs

Trait PositionalInputs 

Source
pub trait PositionalInputs: NumInputs {
    type InputId: IdType;

    // Required method
    fn get_input_var(&self, position: usize) -> Option<Self::InputId>;

    // Provided method
    fn find_input_position(&self, input_id: &Self::InputId) -> Option<usize> { ... }
}
Expand description

Define positions of input variables such that they can be adressed with an index.

Required Associated Types§

Source

type InputId: IdType

ID type used for input variables.

Required Methods§

Source

fn get_input_var(&self, position: usize) -> Option<Self::InputId>

Find the input variable at the given position. Returns None if there’s no variable at the position.

Provided Methods§

Source

fn find_input_position(&self, input_id: &Self::InputId) -> Option<usize>

Find the first position of an input variable.

Implementors§