Struct lace::config::EngineUpdateConfig
source · pub struct EngineUpdateConfig {
pub n_iters: usize,
pub save_config: Option<SaveEngineConfig>,
pub transitions: Vec<StateTransition>,
pub checkpoint: Option<usize>,
}
Expand description
Configuration for Engine.update
Sets the number of iterations, timeout, assignment algorithms, output, and transitions.
Fields§
§n_iters: usize
Maximum number of iterations to run.
save_config: Option<SaveEngineConfig>
Path to lacefile. If defined, will save states to this directory after the run or at checkpoints
transitions: Vec<StateTransition>
Which transitions to run
checkpoint: Option<usize>
Number of iterations after which each state should be saved
Implementations§
source§impl EngineUpdateConfig
impl EngineUpdateConfig
pub fn new() -> Self
pub fn with_default_transitions() -> Self
pub fn default_transitions(self) -> Self
pub fn transitions(self, transitions: Vec<StateTransition>) -> Self
pub fn transition(self, transition: StateTransition) -> Self
sourcepub fn state_config(&self) -> StateUpdateConfig
pub fn state_config(&self) -> StateUpdateConfig
Emit a StateUpdateConfig
with the same settings
pub fn n_iters(self, n_iters: usize) -> Self
pub fn checkpoint(self, checkpoint: Option<usize>) -> Self
Trait Implementations§
source§impl Clone for EngineUpdateConfig
impl Clone for EngineUpdateConfig
source§fn clone(&self) -> EngineUpdateConfig
fn clone(&self) -> EngineUpdateConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EngineUpdateConfig
impl Debug for EngineUpdateConfig
source§impl Default for EngineUpdateConfig
impl Default for EngineUpdateConfig
source§impl<'de> Deserialize<'de> for EngineUpdateConfig
impl<'de> Deserialize<'de> for EngineUpdateConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for EngineUpdateConfig
impl PartialEq for EngineUpdateConfig
source§fn eq(&self, other: &EngineUpdateConfig) -> bool
fn eq(&self, other: &EngineUpdateConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for EngineUpdateConfig
impl Serialize for EngineUpdateConfig
impl Eq for EngineUpdateConfig
impl StructuralPartialEq for EngineUpdateConfig
Auto Trait Implementations§
impl RefUnwindSafe for EngineUpdateConfig
impl Send for EngineUpdateConfig
impl Sync for EngineUpdateConfig
impl Unpin for EngineUpdateConfig
impl UnwindSafe for EngineUpdateConfig
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Pointable for T
impl<T> Pointable for T
§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.