| 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 self.0 |
39 item.eval_ref_decompose(|r| self.0.iter().zip(r.iter()).all(|(s, x)| s.contains(x))) |
| 40 .iter() |
|
| 41 .zip(item.ref_instance().iter()) |
|
| 42 .all(|(s, x)| s.contains(x)) |
|
| 43 } |
40 } |
| 44 } |
41 } |
| 45 |
42 |
| 46 impl<U: Space> Set<U> for RangeFull { |
43 impl<U: Space> Set<U> for RangeFull { |
| 47 fn contains<I: Instance<U>>(&self, _item: I) -> bool { |
44 fn contains<I: Instance<U>>(&self, _item: I) -> bool { |