Struct ai_kit::infer::InferenceEngine
[−]
[src]
pub struct InferenceEngine<'a, T, U, A> where
T: 'a + ConstraintValue,
U: 'a + Unify<T>,
A: 'a + Operation<T, U>, {
pub rules: Vec<(&'a String, &'a A)>,
pub facts: Vec<(&'a String, &'a U)>,
pub derived_facts: Vec<(String, U)>,
pub pedigree: Pedigree,
pub prefix: String,
pub origin_cache: OriginCache,
// some fields omitted
}
Fields
rules: Vec<(&'a String, &'a A)>
facts: Vec<(&'a String, &'a U)>
derived_facts: Vec<(String, U)>
pedigree: Pedigree
prefix: String
origin_cache: OriginCache
Methods
impl<'a, T, U, A> InferenceEngine<'a, T, U, A> where
T: 'a + ConstraintValue,
U: 'a + Unify<T>,
A: 'a + Operation<T, U>,
[src]
T: 'a + ConstraintValue,
U: 'a + Unify<T>,
A: 'a + Operation<T, U>,
fn new(
prefix: String,
rules: Vec<(&'a String, &'a A)>,
facts: Vec<(&'a String, &'a U)>
) -> Self
prefix: String,
rules: Vec<(&'a String, &'a A)>,
facts: Vec<(&'a String, &'a U)>
) -> Self
fn all_facts(&'a self) -> Vec<(&'a String, &'a U)>
fn chain_until_match(
&self,
max_iterations: usize,
goal: &U
) -> (Option<(U, String)>, Self)
&self,
max_iterations: usize,
goal: &U
) -> (Option<(U, String)>, Self)
fn chain_until(
&self,
max_iterations: usize,
satisfied: &Fn(&U) -> bool
) -> (Option<(U, String)>, Self)
&self,
max_iterations: usize,
satisfied: &Fn(&U) -> bool
) -> (Option<(U, String)>, Self)
fn chain_forward(&mut self) -> Vec<(U, Bindings<T>, Origin)>
fn render_inference_tree(
&'a self,
id: &String,
render_type: RenderType
) -> String
&'a self,
id: &String,
render_type: RenderType
) -> String
Trait Implementations
impl<'a, T: Clone, U: Clone, A: Clone> Clone for InferenceEngine<'a, T, U, A> where
T: 'a + ConstraintValue,
U: 'a + Unify<T>,
A: 'a + Operation<T, U>,
[src]
T: 'a + ConstraintValue,
U: 'a + Unify<T>,
A: 'a + Operation<T, U>,
fn clone(&self) -> InferenceEngine<'a, T, U, A>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'a, T: Debug, U: Debug, A: Debug> Debug for InferenceEngine<'a, T, U, A> where
T: 'a + ConstraintValue,
U: 'a + Unify<T>,
A: 'a + Operation<T, U>,
[src]
T: 'a + ConstraintValue,
U: 'a + Unify<T>,
A: 'a + Operation<T, U>,
impl<'a, T: PartialEq, U: PartialEq, A: PartialEq> PartialEq for InferenceEngine<'a, T, U, A> where
T: 'a + ConstraintValue,
U: 'a + Unify<T>,
A: 'a + Operation<T, U>,
[src]
T: 'a + ConstraintValue,
U: 'a + Unify<T>,
A: 'a + Operation<T, U>,
fn eq(&self, __arg_0: &InferenceEngine<'a, T, U, A>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &InferenceEngine<'a, T, U, A>) -> bool
This method tests for !=
.