pub struct AlgorithmSerialisedExport<T: Serialize> {
pub options: T,
pub problem: ProblemExport,
pub individuals: Vec<IndividualExport>,
pub generation: u32,
pub number_of_function_evaluations: u32,
pub algorithm: String,
pub additional_data: Option<HashMap<String, DataValue>>,
pub took: Elapsed,
pub exported_on: DateTime<Utc>,
}
Expand description
The struct used to export an algorithm serialised data.
Fields§
§options: T
Specific options for an algorithm.
problem: ProblemExport
The problem configuration.
individuals: Vec<IndividualExport>
The individuals in the population.
generation: u32
The generation the export was collected at.
number_of_function_evaluations: u32
The number of function evaluations
algorithm: String
The algorithm name.
additional_data: Option<HashMap<String, DataValue>>
Any additional data exported by the algorithm.
took: Elapsed
The time took to reach the generation
.
exported_on: DateTime<Utc>
The date and time when the data was exported
Implementations§
Source§impl<T: Serialize> AlgorithmSerialisedExport<T>
Implement a list of helper functions to get the problem and individuals.
impl<T: Serialize> AlgorithmSerialisedExport<T>
Implement a list of helper functions to get the problem and individuals.
Sourcepub fn problem(&self) -> Result<Problem, OError>
pub fn problem(&self) -> Result<Problem, OError>
Build the Problem
struct from serialised data. The problem will have a dummy
Algorithm::evolve
method.
returns: Result<Problem, OError>
Sourcepub fn individuals(&self) -> Result<Vec<Individual>, OError>
pub fn individuals(&self) -> Result<Vec<Individual>, OError>
Build the vector of Individual
from serialised data. Each individual will have the
objective, constraint, variable and data values from the serialised data.
returns: Result<Vec<Individual>, OError>
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for AlgorithmSerialisedExport<T>where
T: Deserialize<'de> + Serialize,
impl<'de, T> Deserialize<'de> for AlgorithmSerialisedExport<T>where
T: Deserialize<'de> + Serialize,
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<T> Serialize for AlgorithmSerialisedExport<T>
impl<T> Serialize for AlgorithmSerialisedExport<T>
Source§impl<T: Serialize> TryInto<AlgorithmExport> for AlgorithmSerialisedExport<T>
Convert the AlgorithmSerialisedExport
to AlgorithmExport
impl<T: Serialize> TryInto<AlgorithmExport> for AlgorithmSerialisedExport<T>
Convert the AlgorithmSerialisedExport
to AlgorithmExport
Auto Trait Implementations§
impl<T> Freeze for AlgorithmSerialisedExport<T>where
T: Freeze,
impl<T> RefUnwindSafe for AlgorithmSerialisedExport<T>where
T: RefUnwindSafe,
impl<T> Send for AlgorithmSerialisedExport<T>where
T: Send,
impl<T> Sync for AlgorithmSerialisedExport<T>where
T: Sync,
impl<T> Unpin for AlgorithmSerialisedExport<T>where
T: Unpin,
impl<T> UnwindSafe for AlgorithmSerialisedExport<T>where
T: UnwindSafe,
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> 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<T> Pointable for T
impl<T> Pointable for T
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.