/** * 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); }
/** * To knwo the current variable value. * @return An integer corresponding to the variable's current value. */ public int GetValue() { return(Domain.GetValue(IndexDomain)); }
/** * 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()); }