| 219 |
219 |
| 220 pub trait HasDual<F : Num = f64> : Normed<F> { |
220 pub trait HasDual<F : Num = f64> : Normed<F> { |
| 221 type DualSpace : Normed<F>; |
221 type DualSpace : Normed<F>; |
| 222 } |
222 } |
| 223 |
223 |
| |
224 /// Automatically implemented trait for reflexive spaces |
| 224 pub trait Reflexive<F : Num = f64> : HasDual<F> |
225 pub trait Reflexive<F : Num = f64> : HasDual<F> |
| 225 where |
226 where |
| 226 Self::DualSpace : HasDual<F, DualSpace = Self> |
227 Self::DualSpace : HasDual<F, DualSpace = Self> |
| 227 { } |
228 { } |
| 228 |
229 |
| |
230 impl<F : Num, X : HasDual<F>> Reflexive<F> for X |
| |
231 where |
| |
232 X::DualSpace : HasDual<F, DualSpace = X> |
| |
233 { } |
| 229 |
234 |
| 230 pub trait HasDualExponent : NormExponent { |
235 pub trait HasDualExponent : NormExponent { |
| 231 type DualExp : NormExponent; |
236 type DualExp : NormExponent; |
| 232 |
237 |
| 233 fn dual_exponent(&self) -> Self::DualExp; |
238 fn dual_exponent(&self) -> Self::DualExp; |