Struct genevo::simulation::State
source · [−]pub struct State<A> where
A: Algorithm, {
pub started_at: DateTime<Local>,
pub iteration: u64,
pub duration: Duration,
pub processing_time: ProcessingTime,
pub result: <A as Algorithm>::Output,
}
Expand description
The State
struct holds the state of the Simulation
.
Fields
started_at: DateTime<Local>
The local time when this simulation started.
iteration: u64
The number of the iteration that this state represents. Iterations are counted from 1 and increased by 1 on each iteration of the simulation loop.
duration: Duration
Duration of processing the current iteration. This is the time it took to process one iteration of the algorithm.
processing_time: ProcessingTime
Accumulated time spent by each thread in case of parallel processing.
In case of sequential processing this time is nearly the same as the
duration
value. In case of parallel processing this time is usually
a multitude of the duration
.
result: <A as Algorithm>::Output
The result of this iteration.
Trait Implementations
impl<A> StructuralPartialEq for State<A> where
A: Algorithm,
Auto Trait Implementations
impl<A> RefUnwindSafe for State<A> where
<A as Algorithm>::Output: RefUnwindSafe,
impl<A> Send for State<A> where
<A as Algorithm>::Output: Send,
impl<A> Sync for State<A> where
<A as Algorithm>::Output: Sync,
impl<A> Unpin for State<A> where
<A as Algorithm>::Output: Unpin,
impl<A> UnwindSafe for State<A> where
<A as Algorithm>::Output: UnwindSafe,
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