pub struct Variable {
pub level: usize,
pub trail_index: usize,
pub reason: Option<usize>,
}Expand description
求解器内部变量状态(不是 DIMACS 中变量定义本身)。
该结构记录变量在搜索过程中的“赋值元信息”:
- 在哪个决策层被赋值;
- 在
trail中的位置; - 若为传播赋值,其原因子句编号。
Fields§
§level: usize变量被赋值时所在的决策层。
trail_index: usize变量被压入 trail 时的位置(1-based 语义,由外部维护)。
reason: Option<usize>赋值原因子句。
- 决策赋值:
None - 蕴含赋值:
Some(clause_id)
Trait Implementations§
impl Copy for Variable
Auto Trait Implementations§
impl Freeze for Variable
impl RefUnwindSafe for Variable
impl Send for Variable
impl Sync for Variable
impl Unpin for Variable
impl UnsafeUnpin for Variable
impl UnwindSafe for Variable
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