pub trait LatticeElementToIndex<const D: usize> {
    // Required method
    fn to_index(&self, l: &LatticeCyclic<D>) -> usize;
}
Expand description

Trait to convert an element on a lattice to an usize.

Used mainly to index field on the lattice using std::vec::Vec

Required Methods§

source

fn to_index(&self, l: &LatticeCyclic<D>) -> usize

Given a lattice return an index from the element

Implementations on Foreign Types§

source§

impl<const D: usize> LatticeElementToIndex<D> for usize

This is just the identity.

It is implemented for compatibility reason such that function that require a LatticeElementToIndex can also accept usize.

source§

fn to_index(&self, _l: &LatticeCyclic<D>) -> usize

return self

Implementors§