pub struct SolverBuilder<S>where
S: Search,{
pub(crate) search: S,
pub(crate) kernel: Kernel,
}Expand description
Solver 构建器:负责准备搜索器与内核初始状态。
Fields§
§search: S§kernel: KernelImplementations§
Source§impl<S> SolverBuilder<S>where
S: Search,
impl<S> SolverBuilder<S>where
S: Search,
Sourcepub fn with_max_vars(search: S, max_vars: usize) -> Self
pub fn with_max_vars(search: S, max_vars: usize) -> Self
用变量上限创建空公式求解器构建器。
Sourcepub fn from_dimacs_str(search: S, dimacs: &str) -> Result<Self, DimacsError>
pub fn from_dimacs_str(search: S, dimacs: &str) -> Result<Self, DimacsError>
从 DIMACS 字符串创建构建器。
Sourcepub fn from_dimacs_file(
search: S,
path: impl AsRef<Path>,
) -> Result<Self, DimacsError>
pub fn from_dimacs_file( search: S, path: impl AsRef<Path>, ) -> Result<Self, DimacsError>
从 DIMACS 文件创建构建器。
Sourcepub fn kernel_mut(&mut self) -> &mut Kernel
pub fn kernel_mut(&mut self) -> &mut Kernel
可变访问内核(用于自定义注入子句/参数)。
Auto Trait Implementations§
impl<S> Freeze for SolverBuilder<S>where
S: Freeze,
impl<S> RefUnwindSafe for SolverBuilder<S>where
S: RefUnwindSafe,
impl<S> Send for SolverBuilder<S>where
S: Send,
impl<S> Sync for SolverBuilder<S>where
S: Sync,
impl<S> Unpin for SolverBuilder<S>where
S: Unpin,
impl<S> UnsafeUnpin for SolverBuilder<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for SolverBuilder<S>where
S: UnwindSafe,
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