Expand description
Ccontains the struct wrapper::RingElementWrapper that contains an element together with its ring,
and thus can provide ring operations without explicit access to the ring.
Using this is for example necessary if you want to use elements of a crate::ring::HashableElRing-ring
as elements in a std::collections::HashSet.
let mut set = HashSet::new();
set.insert(RingElementWrapper::new(BigIntRing::RING, BigIntRing::RING.int_hom().map(3)));
assert!(set.contains(&RingElementWrapper::new(BigIntRing::RING, BigIntRing::RING.int_hom().map(3))));Structsยง
- Stores a ring element together with its ring, so that ring operations do not require explicit mention of the ring object. This can be used both for convenience of notation (i.e. use
a + binstead ofring.add(a, b)) and might also be necessary when e.g. storing elements in a set.