Thanks to visit codestin.com
Credit goes to docs.rs

Indexable

Trait Indexable 

Source
pub trait Indexable {
    // Required method
    fn set(&self, idxr: &mut Indexer<'_>, dim: u32, is_batch: Option<bool>);
}
Expand description

Trait bound indicating indexability

Any object to be able to be passed on to Indexer::set_index() method should implement this trait with appropriate implementation of set method.

Required Methods§

Source

fn set(&self, idxr: &mut Indexer<'_>, dim: u32, is_batch: Option<bool>)

Set indexing object for a given dimension

is_batch parameter is not used in most cases as it has been provided in ArrayFire C-API to enable GFOR construct in ArrayFire C++ API. This type of construct/idea is not exposed in rust wrapper yet. So, the user would just need to pass None to this parameter while calling this function. Since we can’t have default default values and we wanted to keep this parameter for future use cases, we just made it an std::Option.

§Parameters
  • idxr is mutable reference to Indexer object which will be modified to set self indexable along dim dimension.
  • dim is the dimension along which self indexable will be used for indexing.
  • is_batch is only used if self is Seq to indicate if indexing along dim is a batched operation.

Implementors§

Source§

impl<T> Indexable for Array<T>

Enables Array to be used to index another Array

This is used in functions index_gen and assign_gen

Source§

impl<T> Indexable for Seq<T>
where c_double: From<T>, T: Copy + IndexableType,

Enables Seq to be used to index another Array

This is used in functions index_gen and assign_gen