Push() public method

public Push ( Variable v ) : void
v Variable
return void
コード例 #1
0
 /// <summary>
 /// Updates the domain of the current variable with the parameter domain d after
 /// pushing the Trail trial
 /// </summary>
 /// <param name="d">the domain to be updated with</param>
 /// <param name="trail">the trail to be pushed</param>
 public virtual void  UpdateDomain(Domain d, Trail trail)
 {
     if (domain == null || !domain.Equals(d))
     {
         trail.Push(this);
         domain   = d;
         modified = true;
         if (watch)
         {
             Console.Out.WriteLine(this + " = " + domain);
         }
     }
 }
コード例 #2
0
ファイル: Variable.cs プロジェクト: kikoanis/CSharpCream
 /// <summary>
 /// Updates the domain of the current variable with the parameter domain d after
 /// pushing the Trail trial
 /// </summary>
 /// <param name="d">the domain to be updated with</param>
 /// <param name="trail">the trail to be pushed</param>
 public virtual void UpdateDomain(Domain d, Trail trail)
 {
     if (_domain == null || !_domain.Equals(d))
     {
         trail.Push(this);
         _domain = d;
         _modified = true;
         if (_watch)
         {
             Console.Out.WriteLine(this + " = " + _domain);
         }
     }
 }