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§


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

Given a lattice return an index from the element

Implementations on Foreign Types§


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.


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

return self