pub struct SimulatedBinaryCrossoverArgs {
pub distribution_index: f64,
pub crossover_probability: f64,
pub variable_probability: f64,
}Expand description
Input arguments for SimulatedBinaryCrossover.
Fields§
§distribution_index: f64The distribution index for crossover (this is the eta_c in the paper). This directly control the spread of children. If a large value is selected, the resulting children will have a higher probability of being close to their parents; a small value generates distant offsprings.
crossover_probability: f64The probability that the parents participate in the crossover. If 1.0, the parents always participate in the crossover. If the probability is lower, then the children are the exact clones of their parents (i.e. all the variable values do not change).
variable_probability: f64The probability that a variable belonging to both parents is used in the crossover. The paper uses 0.5, meaning that each variable in a solution has a 50% chance of changing its value.
Implementations§
Trait Implementations§
Source§impl Clone for SimulatedBinaryCrossoverArgs
impl Clone for SimulatedBinaryCrossoverArgs
Source§fn clone(&self) -> SimulatedBinaryCrossoverArgs
fn clone(&self) -> SimulatedBinaryCrossoverArgs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for SimulatedBinaryCrossoverArgs
impl<'de> Deserialize<'de> for SimulatedBinaryCrossoverArgs
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<'py> IntoPyObject<'py> for SimulatedBinaryCrossoverArgs
impl<'py> IntoPyObject<'py> for SimulatedBinaryCrossoverArgs
Source§type Target = SimulatedBinaryCrossoverArgs
type Target = SimulatedBinaryCrossoverArgs
Source§type Output = Bound<'py, <SimulatedBinaryCrossoverArgs as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <SimulatedBinaryCrossoverArgs as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClassImpl for SimulatedBinaryCrossoverArgs
impl PyClassImpl for SimulatedBinaryCrossoverArgs
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§type ThreadChecker = SendablePyClass<SimulatedBinaryCrossoverArgs>
type ThreadChecker = SendablePyClass<SimulatedBinaryCrossoverArgs>
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature<SimulatedBinaryCrossoverArgs> for PyClassImplCollector<SimulatedBinaryCrossoverArgs>
impl PyClassNewTextSignature<SimulatedBinaryCrossoverArgs> for PyClassImplCollector<SimulatedBinaryCrossoverArgs>
fn new_text_signature(self) -> Option<&'static str>
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a SimulatedBinaryCrossoverArgs
impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a SimulatedBinaryCrossoverArgs
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a mut SimulatedBinaryCrossoverArgs
impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a mut SimulatedBinaryCrossoverArgs
Source§impl PyMethods<SimulatedBinaryCrossoverArgs> for PyClassImplCollector<SimulatedBinaryCrossoverArgs>
impl PyMethods<SimulatedBinaryCrossoverArgs> for PyClassImplCollector<SimulatedBinaryCrossoverArgs>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for SimulatedBinaryCrossoverArgs
impl PyTypeInfo for SimulatedBinaryCrossoverArgs
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Source§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
impl DerefToPyAny for SimulatedBinaryCrossoverArgs
Auto Trait Implementations§
impl Freeze for SimulatedBinaryCrossoverArgs
impl RefUnwindSafe for SimulatedBinaryCrossoverArgs
impl Send for SimulatedBinaryCrossoverArgs
impl Sync for SimulatedBinaryCrossoverArgs
impl Unpin for SimulatedBinaryCrossoverArgs
impl UnwindSafe for SimulatedBinaryCrossoverArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromPyObject<'_> for T
impl<T> FromPyObject<'_> for T
Source§impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
Source§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.