Struct splr::state::State

source ·
pub struct State {
Show 20 fields pub config: Config, pub cnf: CNFDescription, pub stats: [usize; 7], pub restart: RestartManager, pub stm: StageManager, pub target: CNFDescription, pub reflection_interval: usize, pub b_lvl: Ema, pub c_lvl: Ema, pub e_mode: Ema2, pub e_mode_threshold: f64, pub exploration_rate_ema: Ema, pub last_asg: usize, pub new_learnt: Vec<Lit>, pub derive20: Vec<ClauseId>, pub progress_cnt: usize, pub record: ProgressRecord, pub sls_index: usize, pub start: Instant, pub time_limit: f64, /* private fields */
}
Expand description

Data storage for Solver.

Fields§

§config: Config

solver configuration

§cnf: CNFDescription

the problem.

§stats: [usize; 7]

collection of statistics data

§restart: RestartManager§stm: StageManager

StageManager

§target: CNFDescription

problem description

§reflection_interval: usize

strategy adjustment interval in conflict

§b_lvl: Ema

EMA of backjump levels

§c_lvl: Ema

EMA of conflicting levels

§e_mode: Ema2

EMA of c_lbd - b_lbd, or Exploration vs. Eploitation

§e_mode_threshold: f64§exploration_rate_ema: Ema§last_asg: usize

hold the previous number of non-conflicting assignment

§new_learnt: Vec<Lit>

working place to build learnt clauses

§derive20: Vec<ClauseId>

working place to store given clauses’ ids which is used to derive a good learnt

§progress_cnt: usize

progress invocation counter

§record: ProgressRecord

keep the previous statistics values

§sls_index: usize

progress of SLS

§start: Instant

start clock for timeout handling

§time_limit: f64

upper limit for timeout handling

Trait Implementations§

source§

impl Clone for State

source§

fn clone(&self) -> State

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for State

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for State

source§

fn default() -> State

Returns the “default value” for a type. Read more
source§

impl Display for State

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Index<LogF64Id> for State

§

type Output = f64

The returned type after indexing.
source§

fn index(&self, i: LogF64Id) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl Index<LogUsizeId> for State

§

type Output = usize

The returned type after indexing.
source§

fn index(&self, i: LogUsizeId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl Index<Stat> for State

§

type Output = usize

The returned type after indexing.
source§

fn index(&self, i: Stat) -> &usize

Performs the indexing (container[index]) operation. Read more
source§

impl IndexMut<LogF64Id> for State

source§

fn index_mut(&mut self, i: LogF64Id) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<LogUsizeId> for State

source§

fn index_mut(&mut self, i: LogUsizeId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<Stat> for State

source§

fn index_mut(&mut self, i: Stat) -> &mut usize

Performs the mutable indexing (container[index]) operation. Read more
source§

impl Instantiate for State

source§

fn instantiate(config: &Config, cnf: &CNFDescription) -> State

make and return an object from Config and CNFDescription.
source§

fn handle(&mut self, e: SolverEvent)

update by a solver event.
source§

impl PropertyDereference<Tusize, usize> for State

source§

fn derefer(&self, k: Tusize) -> usize

source§

impl PropertyReference<TEma, EmaView> for State

source§

fn refer(&self, k: TEma) -> &EmaView

source§

impl StateIF for State

source§

fn progress<A, C>(&mut self, asg: &A, cdb: &C)

mes should be shorter than or equal to 9, or 8 + a delimiter.

source§

fn is_timeout(&self) -> bool

return true if it is timed out.
source§

fn elapsed(&self) -> Option<f64>

return elapsed time as a fraction. return None if something is wrong.
source§

fn progress_header(&mut self)

write a header of stat data to stdio.
source§

fn flush<S: AsRef<str>>(&self, mes: S)

write a short message to stdout.
source§

fn log<S: AsRef<str>>( &mut self, tick: Option<(Option<usize>, Option<usize>, usize)>, mes: S )

write a one-line message as log.

Auto Trait Implementations§

§

impl RefUnwindSafe for State

§

impl Send for State

§

impl Sync for State

§

impl Unpin for State

§

impl UnwindSafe for State

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.