1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
use super::def::IntervalSet;

use fp::Float;
use transc::Transc;

impl<BOUND: Float> Transc for IntervalSet<BOUND> {
    type Output = Self;

     fn log(mut self) -> Self::Output {
        Self::from_intervals(self.intervals.drain(..).map(|i| i.log()).collect())
    }

     fn exp(mut self) -> Self::Output {
        Self::from_intervals(self.intervals.drain(..).map(|i| i.exp()).collect())
    }

     fn pow(self, rhs: Self) -> Self::Output {
        self.binary_op(rhs, |i, j| i.pow_multi(j))
    }
}