| 1 use std::iter::Chain; |
1 use std::iter::Chain; |
| 2 use std::sync::Arc; |
2 use std::sync::Arc; |
| 3 |
3 |
| 4 use crate::iter::{MapF, MapZ, Mappable}; |
4 use crate::iter::{MapF, MapZ, Mappable}; |
| 5 use crate::loc::Loc; |
5 use crate::loc::Loc; |
| 6 use crate::mapping::{DifferentiableImpl, DifferentiableMapping, Instance, Mapping, Space}; |
6 use crate::mapping::{ |
| |
7 ClosedSpace, DifferentiableImpl, DifferentiableMapping, Instance, Mapping, Space, |
| |
8 }; |
| 7 use crate::sets::Cube; |
9 use crate::sets::Cube; |
| 8 use crate::types::*; |
10 use crate::types::*; |
| 9 |
11 |
| 10 use super::aggregator::*; |
12 use super::aggregator::*; |
| 11 use super::support::*; |
13 use super::support::*; |
| 190 } |
192 } |
| 191 } |
193 } |
| 192 |
194 |
| 193 impl<F, S1, S2, X> Mapping<X> for EitherSupport<S2, S1> |
195 impl<F, S1, S2, X> Mapping<X> for EitherSupport<S2, S1> |
| 194 where |
196 where |
| 195 F: Space, |
197 F: ClosedSpace, |
| 196 X: Space, |
198 X: Space, |
| 197 S1: Mapping<X, Codomain = F>, |
199 S1: Mapping<X, Codomain = F>, |
| 198 S2: Mapping<X, Codomain = F>, |
200 S2: Mapping<X, Codomain = F>, |
| 199 { |
201 { |
| 200 type Codomain = F; |
202 type Codomain = F; |
| 208 } |
210 } |
| 209 } |
211 } |
| 210 |
212 |
| 211 impl<X, S1, S2, O> DifferentiableImpl<X> for EitherSupport<S2, S1> |
213 impl<X, S1, S2, O> DifferentiableImpl<X> for EitherSupport<S2, S1> |
| 212 where |
214 where |
| 213 O: Space, |
215 O: ClosedSpace, |
| 214 X: Space, |
216 X: ClosedSpace, |
| 215 S1: DifferentiableMapping<X, DerivativeDomain = O>, |
217 S1: DifferentiableMapping<X, DerivativeDomain = O>, |
| 216 S2: DifferentiableMapping<X, DerivativeDomain = O>, |
218 S2: DifferentiableMapping<X, DerivativeDomain = O>, |
| 217 { |
219 { |
| 218 type Derivative = O; |
220 type Derivative = O; |
| 219 |
221 |