Skip to main content

Not

A class in Root.Township, Alta.Intelligence.

Logical NOT in the unused Prolog-like logic engine, with weightings: a half-true goal gives a half-true result.

Constructors​

MemberWhat it is
Not(Predicate right)Creates a Not from right.

Properties​

1 private and internal property
MemberWhat it is
private Predicate Right { get; set; }The goal being negated.

Methods​

MemberWhat it is
override string ToString()Shows the goal prefixed with !.
protected override IEnumerable<Result> EvaluateInternal(KnowledgeHolder knowledgeHolder) (iterator)Yields each inner result with its weighting flipped to 1 minus it. Stops at a fully true result; otherwise ends with a plain true result.
protected override Predicate FromCompoundPart(CompoundPart compoundPart)Rebuilds a Not from bound parts when variables are substituted.