pub struct DepthFirstSearch { /* private fields */ }Expand description
Depth-first search implementation
Implementations§
Source§impl DepthFirstSearch
impl DepthFirstSearch
Sourcepub fn new(max_depth: usize, kb: KnowledgeBase) -> Self
pub fn new(max_depth: usize, kb: KnowledgeBase) -> Self
Create a new depth-first search
Sourcepub fn new_with_engine(
max_depth: usize,
kb: KnowledgeBase,
engine: Option<Arc<Mutex<IncrementalEngine>>>,
) -> Self
pub fn new_with_engine( max_depth: usize, kb: KnowledgeBase, engine: Option<Arc<Mutex<IncrementalEngine>>>, ) -> Self
Create a new depth-first search and wire an optional IncrementalEngine
to enable TMS logical insertion. The engine is provided as Arc<Mutex<>>
and the inserter closure will call insert_logical on it.
Sourcepub fn search_with_execution(
&mut self,
goal: &mut Goal,
facts: &mut Facts,
kb: &KnowledgeBase,
) -> SearchResult
pub fn search_with_execution( &mut self, goal: &mut Goal, facts: &mut Facts, kb: &KnowledgeBase, ) -> SearchResult
Search for a proof of the goal WITH rule execution
Sourcepub fn search(&mut self, goal: &mut Goal, _facts: &Facts) -> SearchResult
pub fn search(&mut self, goal: &mut Goal, _facts: &Facts) -> SearchResult
Search for a proof of the goal (old method, kept for compatibility)
Auto Trait Implementations§
impl Freeze for DepthFirstSearch
impl !RefUnwindSafe for DepthFirstSearch
impl Send for DepthFirstSearch
impl Sync for DepthFirstSearch
impl Unpin for DepthFirstSearch
impl !UnwindSafe for DepthFirstSearch
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