Skip to content

Commit 61ab73b

Browse files
committed
Renaming to_xtypes
1 parent a24e0d4 commit 61ab73b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ego/src/egor_service.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl EgorServiceBuilder {
8888
};
8989
EgorService {
9090
config: EgorConfig {
91-
xtypes: Some(continuous_xlimits_to_xtypes(xlimits)),
91+
xtypes: Some(to_xtypes(xlimits)),
9292
..self.config.clone()
9393
},
9494
solver: EgorSolver::new(self.config, xlimits, rng),

ego/src/egor_solver.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,11 @@ impl<SB: SurrogateBuilder> EgorSolver<SB> {
232232
builder.try_init().ok();
233233
EgorSolver {
234234
config: EgorConfig {
235-
xtypes: Some(continuous_xlimits_to_xtypes(xlimits)), // align xlimits and xtypes
235+
xtypes: Some(to_xtypes(xlimits)), // align xlimits and xtypes
236236
..config
237237
},
238238
xlimits: xlimits.to_owned(),
239-
surrogate_builder: SB::new_with_xtypes(&continuous_xlimits_to_xtypes(xlimits)),
239+
surrogate_builder: SB::new_with_xtypes(&to_xtypes(xlimits)),
240240
rng,
241241
}
242242
}
@@ -299,7 +299,7 @@ impl<SB: SurrogateBuilder> EgorSolver<SB> {
299299
/// Build `xtypes` from simple float bounds of `x` input components when x belongs to R^n.
300300
/// xlimits are bounds of the x components expressed a matrix (dim, 2) where dim is the dimension of x
301301
/// the ith row is the bounds interval [lower, upper] of the ith comonent of `x`.
302-
pub fn continuous_xlimits_to_xtypes(xlimits: &ArrayBase<impl Data<Elem = f64>, Ix2>) -> Vec<XType> {
302+
pub fn to_xtypes(xlimits: &ArrayBase<impl Data<Elem = f64>, Ix2>) -> Vec<XType> {
303303
let mut xtypes: Vec<XType> = vec![];
304304
Zip::from(xlimits.rows()).for_each(|limits| xtypes.push(XType::Cont(limits[0], limits[1])));
305305
xtypes

0 commit comments

Comments
 (0)