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§
Sourcefn to_index(&self, l: &LatticeCyclic<D>) -> usize
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.
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
fn to_index(&self, _l: &LatticeCyclic<D>) -> usize
return self