pub struct SimpleTransitioner {
state_buffer: Vec<Arc<IterationState>>,
time_per_flomap: f64,
remaining_time: f64,
current_index: usize,
}Fields§
§state_buffer: Vec<Arc<IterationState>>§time_per_flomap: f64§remaining_time: f64§current_index: usizeTrait Implementations§
Source§impl FlowMapTransitioner for SimpleTransitioner
impl FlowMapTransitioner for SimpleTransitioner
Source§fn advance_arc(
&mut self,
_current_time: f64,
time_step: f64,
) -> Arc<IterationState>
fn advance_arc( &mut self, _current_time: f64, time_step: f64, ) -> Arc<IterationState>
Source§fn get_at(&self, idx: usize) -> Option<Arc<IterationState>>
fn get_at(&self, idx: usize) -> Option<Arc<IterationState>>
Retrieves the state at the given buffer index as an owned
Arc. Read moreSource§fn advance(&mut self, _current_time: f64, time_step: f64) -> &IterationState
fn advance(&mut self, _current_time: f64, time_step: f64) -> &IterationState
Advances the internal state according to
current_time and
time_step, and returns a borrowed reference to the active
IterationState. Read moreSource§fn need_advance(&self, _current_time: f64, _time_step: f64) -> bool
fn need_advance(&self, _current_time: f64, _time_step: f64) -> bool
Returns
true if the flow-map index should advance when evaluating
the given current_time and time_step. Read moreSource§fn get_current(&self) -> &IterationState
fn get_current(&self) -> &IterationState
Returns the current state as a borrowed reference.
Source§fn get_current_arc(&self) -> Arc<IterationState>
fn get_current_arc(&self) -> Arc<IterationState>
Returns the current state as an owned
Arc<IterationState>.Source§fn new(time_per_flomap: f64, buffer: FlowMapBuffer) -> Self
fn new(time_per_flomap: f64, buffer: FlowMapBuffer) -> Self
Constructs a new transitioner from the duration of each flow-map (
time_per_flomap)
and a validated FlowMapBuffer. Read moreAuto Trait Implementations§
impl Freeze for SimpleTransitioner
impl RefUnwindSafe for SimpleTransitioner
impl Send for SimpleTransitioner
impl Sync for SimpleTransitioner
impl Unpin for SimpleTransitioner
impl UnsafeUnpin for SimpleTransitioner
impl UnwindSafe for SimpleTransitioner
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
Mutably borrows from an owned value. Read more
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.