예제 #1
0
        /**
         * To know what values are in the current domain.
         * @return a List<int> of values belonging to the variable domain.
         */
        public List <int> PossibleValues()
        {
            var possibleValues = new List <int>();

            for (int i = 0; i < Domain.GetSize(); ++i)
            {
                possibleValues.Add(Domain.GetValue(i));
            }

            return(possibleValues);
        }
예제 #2
0
 /**
  * To knwo the current variable value.
  * @return An integer corresponding to the variable's current value.
  */
 public int GetValue()
 {
     return(Domain.GetValue(IndexDomain));
 }
예제 #3
0
 /**
  * To know what values are in the current domain.
  * @return a List<int> of values belonging to the variable domain.
  */
 public List <int> PossibleValues()
 {
     return(Enumerable.Range(0, Domain.GetSize())
            .Select(i => Domain.GetValue(i))
            .ToList());
 }