| 100 ([0.80, 0.50], 4.0), |
100 ([0.80, 0.50], 4.0), |
| 101 ([0.30, 0.70], 5.0) |
101 ([0.30, 0.70], 5.0) |
| 102 ]; |
102 ]; |
| 103 |
103 |
| 104 /// The $\{0,1\}$-valued characteristic function of a ball as a [`Mapping`]. |
104 /// The $\{0,1\}$-valued characteristic function of a ball as a [`Mapping`]. |
| 105 #[derive(Debug,Copy,Clone,Serialize,PartialEq)] |
105 #[derive(Debug,Copy,Clone,Serialize,Deserialize,PartialEq)] |
| |
106 #[serde(bound( |
| |
107 serialize = "F : Serialize, |
| |
108 Loc<F, N> : Serialize", |
| |
109 deserialize = "F : for<'a> Deserialize<'a>, |
| |
110 Loc<F, N> : for<'a> Deserialize<'a>", |
| |
111 ))] |
| 106 struct BallCharacteristic<F : Float, const N : usize> { |
112 struct BallCharacteristic<F : Float, const N : usize> { |
| 107 pub center : Loc<F, N>, |
113 pub center : Loc<F, N>, |
| 108 pub radius : F, |
114 pub radius : F, |
| 109 } |
115 } |
| 110 |
116 |