Push() public method

public Push ( Variable v ) : void
v Variable
return void
Ejemplo n.º 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);
         }
     }
 }
Ejemplo n.º 2
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);
         }
     }
 }