@@ -165,7 +165,7 @@ pub struct EgorSolver<SB: SurrogateBuilder> {
165
165
impl SurrogateBuilder for MoeParams < f64 , Xoshiro256Plus > {
166
166
/// Constructor from domain space specified with types
167
167
/// **panic** if xtypes contains other types than continuous type `Float`
168
- fn new_with_xtypes_rng ( xtypes : & [ XType ] ) -> Self {
168
+ fn new_with_xtypes ( xtypes : & [ XType ] ) -> Self {
169
169
if !no_discrete ( xtypes) {
170
170
panic ! ( "MoeParams cannot be created with discrete types!" ) ;
171
171
}
@@ -236,7 +236,7 @@ impl<SB: SurrogateBuilder> EgorSolver<SB> {
236
236
..config
237
237
} ,
238
238
xlimits : xlimits. to_owned ( ) ,
239
- surrogate_builder : SB :: new_with_xtypes_rng ( & continuous_xlimits_to_xtypes ( xlimits) ) ,
239
+ surrogate_builder : SB :: new_with_xtypes ( & continuous_xlimits_to_xtypes ( xlimits) ) ,
240
240
rng,
241
241
}
242
242
}
@@ -260,7 +260,7 @@ impl<SB: SurrogateBuilder> EgorSolver<SB> {
260
260
..config
261
261
} ,
262
262
xlimits : unfold_xtypes_as_continuous_limits ( xtypes) ,
263
- surrogate_builder : SB :: new_with_xtypes_rng ( xtypes) ,
263
+ surrogate_builder : SB :: new_with_xtypes ( xtypes) ,
264
264
rng,
265
265
}
266
266
}
@@ -299,7 +299,7 @@ impl<SB: SurrogateBuilder> EgorSolver<SB> {
299
299
/// Build `xtypes` from simple float bounds of `x` input components when x belongs to R^n.
300
300
/// xlimits are bounds of the x components expressed a matrix (dim, 2) where dim is the dimension of x
301
301
/// the ith row is the bounds interval [lower, upper] of the ith comonent of `x`.
302
- fn continuous_xlimits_to_xtypes ( xlimits : & ArrayBase < impl Data < Elem = f64 > , Ix2 > ) -> Vec < XType > {
302
+ pub fn continuous_xlimits_to_xtypes ( xlimits : & ArrayBase < impl Data < Elem = f64 > , Ix2 > ) -> Vec < XType > {
303
303
let mut xtypes: Vec < XType > = vec ! [ ] ;
304
304
Zip :: from ( xlimits. rows ( ) ) . for_each ( |limits| xtypes. push ( XType :: Cont ( limits[ 0 ] , limits[ 1 ] ) ) ) ;
305
305
xtypes
0 commit comments