| 19 type Type = F; |
19 type Type = F; |
| 20 #[inline] |
20 #[inline] |
| 21 fn value(&self) -> F { *self } |
21 fn value(&self) -> F { *self } |
| 22 } |
22 } |
| 23 |
23 |
| 24 /// Weighting of a [`Support`] and [`Apply`] by scalar multiplication; |
24 /// Weighting of a [`Mapping`] by scalar multiplication. |
| 25 /// output of [`Support::weigh`]. |
|
| 26 #[derive(Copy,Clone,Debug,Serialize)] |
25 #[derive(Copy,Clone,Debug,Serialize)] |
| 27 pub struct Weighted<T, C : Constant> { |
26 pub struct Weighted<T, C : Constant> { |
| 28 /// The weight |
27 /// The weight |
| 29 pub weight : C, |
28 pub weight : C, |
| 30 /// The base [`Support`] or [`Apply`] being weighted. |
29 /// The base [`Mapping`] being weighted. |
| 31 pub base_fn : T, |
30 pub base_fn : T, |
| 32 } |
31 } |
| 33 |
32 |
| 34 impl<T, C> Weighted<T, C> |
33 impl<T, C> Weighted<T, C> |
| 35 where |
34 where |