hyperopt 0.0.17

Tree-of-Parzen-estimators hyperparameter optimization
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::ops::RangeInclusive;

/// [`Copy`] implementation for ranges, since they do not want to include it into the
/// standard library 😕
pub trait CopyRange<T> {
    fn copy(&self) -> Self;
}

impl<T: Copy> CopyRange<T> for RangeInclusive<T> {
    fn copy(&self) -> Self {
        *self.start()..=*self.end()
    }
}