src/bisection_tree/either.rs

branch
dev
changeset 47
a0db98c16ab5
parent 29
7fd0984743b5
child 59
9226980e45a7
child 81
d2acaaddd9af
equal deleted inserted replaced
46:bd924d62d952 47:a0db98c16ab5
189 } 189 }
190 } 190 }
191 } 191 }
192 192
193 impl<F, S1, S2, X> Differentiable<X> for EitherSupport<S1, S2> 193 impl<F, S1, S2, X> Differentiable<X> for EitherSupport<S1, S2>
194 where S1 : Differentiable<X, Output=F>, 194 where S1 : Differentiable<X, Derivative=F>,
195 S2 : Differentiable<X, Output=F> { 195 S2 : Differentiable<X, Derivative=F> {
196 type Output = F; 196 type Derivative = F;
197 #[inline] 197 #[inline]
198 fn differential(&self, x : X) -> F { 198 fn differential(&self, x : X) -> F {
199 match self { 199 match self {
200 EitherSupport::Left(ref a) => a.differential(x), 200 EitherSupport::Left(ref a) => a.differential(x),
201 EitherSupport::Right(ref b) => b.differential(x), 201 EitherSupport::Right(ref b) => b.differential(x),

mercurial