pub struct Suite { /* private fields */ }
Expand description
A COCO suite
Implementations
sourceimpl Suite
impl Suite
sourcepub fn new(name: SuiteName, instance: &str, options: &str) -> Option<Suite>
pub fn new(name: SuiteName, instance: &str, options: &str) -> Option<Suite>
Instantiates the specified COCO suite.
suite_instance
A string used for defining the suite instances. Two ways are supported:
- “year: YEAR”, where YEAR is the year of the BBOB workshop, includes the instances (to be) used in that year’s workshop;
- “instances: VALUES”, where VALUES are instance numbers from 1 on written as a comma-separated list or a range m-n.
suite_options
A string of pairs “key: value” used to filter the suite (especially useful for parallelizing the experiments). Supported options:
- “dimensions: LIST”, where LIST is the list of dimensions to keep in the suite (range-style syntax is not allowed here),
- “dimension_indices: VALUES”, where VALUES is a list or a range of dimension indices (starting from 1) to keep in the suite, and
- “function_indices: VALUES”, where VALUES is a list or a range of function indices (starting from 1) to keep in the suite, and
- “instance_indices: VALUES”, where VALUES is a list or a range of instance indices (starting from 1) to keep in the suite.
sourcepub fn next_problem<'s>(
&'s mut self,
observer: Option<&mut Observer>
) -> Option<Problem<'s>>
pub fn next_problem<'s>(
&'s mut self,
observer: Option<&mut Observer>
) -> Option<Problem<'s>>
Returns the next problem or None
when the suite completed.
sourcepub fn problem_by_function_dimension_instance(
&mut self,
function: usize,
dimension: usize,
instance: usize
) -> Option<Problem<'_>>
pub fn problem_by_function_dimension_instance(
&mut self,
function: usize,
dimension: usize,
instance: usize
) -> Option<Problem<'_>>
Returns the problem for the given function, dimension and instance.
While a suite can contain multiple problems with equal function, dimension and instance, this
function always returns the first problem in the suite with the given function, dimension and instance
values. If the given values don’t correspond to a problem, the function returns None
.
sourcepub fn number_of_problems(&self) -> usize
pub fn number_of_problems(&self) -> usize
Returns the total number of problems in the suite.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more