摘要 |
Embodiments of the present invention describe using a data structure to represent variable domains in solving a constraint problem. The data structure includes nodes that are configured to represent ranges of values in order to save memory space and processor power. Ranges of values and single values may be both added to and removed from the data structure such that the data structure does not include duplicate values. Operations may include detecting multiple nodes with adjacent or overlapping ranges that may be combined into a single node, and adding or removing all the values in the structure that are beyond a threshold value. In one embodiment the data structure may be a balanced binary tree. Constraint solvers may either add values to the data structure as the values are eliminated from the solution, or they may remove those values.
|