| 34 impl<U, const N: usize> Set<Loc<N, U>> for Cube<N, U> |
34 impl<U, const N: usize> Set<Loc<N, U>> for Cube<N, U> |
| 35 where |
35 where |
| 36 U: Num + PartialOrd + Sized, |
36 U: Num + PartialOrd + Sized, |
| 37 { |
37 { |
| 38 fn contains<I: Instance<Loc<N, U>>>(&self, item: I) -> bool { |
38 fn contains<I: Instance<Loc<N, U>>>(&self, item: I) -> bool { |
| 39 item.eval_ref_decompose(|r| self.0.iter().zip(r.iter()).all(|(s, x)| s.contains(x))) |
39 item.eval_ref(|r| self.0.iter().zip(r.iter()).all(|(s, x)| s.contains(x))) |
| 40 } |
40 } |
| 41 } |
41 } |
| 42 |
42 |
| 43 impl<U: Space> Set<U> for RangeFull { |
43 impl<U: Space> Set<U> for RangeFull { |
| 44 fn contains<I: Instance<U>>(&self, _item: I) -> bool { |
44 fn contains<I: Instance<U>>(&self, _item: I) -> bool { |