Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WME"/> class.
 /// </summary>
 /// <param name="label">The label.</param>
 /// <param name="v1">The Identifier.</param>
 /// <param name="v2">The Attribute.</param>
 /// <param name="v3">The Value.</param>
 public WME(string label, Term v1, Term v2, Term v3)
     : this(label)
 {
     Identifier = v1;
     Attribute = v2;
     Value = v3;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WME"/> class.
 /// </summary>
 /// <param name="v1">The Identifier.</param>
 /// <param name="v2">The Attribute.</param>
 /// <param name="v3">The Value.</param>
 public WME(Term v1, Term v2, Term v3)
     : this("WME", v1, v2, v3)
 {
 }
Beispiel #3
0
 /// <summary>
 /// Gets the term position from conditions.
 /// </summary>
 /// <param name="conditional">The conditional.</param>
 /// <returns></returns>
 private int GetTermPositionFromConditions(Term conditional)
 {
     for (int i = 0; i < 3; i++)
     {
         Term t = _lhs[0].Fields[i];
         if (t.Value.Equals(conditional.Value))
             return i;
     }
     return -1;
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BindingPair"/> class.
 /// </summary>
 /// <param name="variable">The variable.</param>
 /// <param name="term">The term.</param>
 public BindingPair(Variable variable, Term term)
 {
     _variable = variable;
     _substitutor = term;
 }
Beispiel #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BindingPair"/> class.
 /// </summary>
 /// <param name="variable">The variable.</param>
 /// <param name="term">The term.</param>
 public BindingPair(Variable variable, Term term)
 {
     _variable    = variable;
     _substitutor = term;
 }