geosolver.constraint | index /home/rick/Programming/Python/GeoSolver/geosolver/constraint.py |
Module for constraint graphs
Copyright Rick van der Meiden 2003, 2004
Started 1 Nov 2003.
A constraint graph represents a constraint problem. A constraint defines a
number of variables, and a relation between those variables that must be
satisfied.
Note that no values are associated with variables in the constraint graph, i.e.
satisfying constraints is not considered in this module.
The constraint graph is (internally) represented by a directed bi-partite
graph; nodes are variables or constraints and edges run from variables to
constraints.
Variables are just names; any non-mutable hashable object, e.g. a string,
qualifies for a variable. Constraints must be instances of (suclasses of) class
Constraint, and must also be non-mutable, hashable objects.
Changes:
23 Nov 2004 - added Error classes, updated naming and doc conventions (PEP 8, 257)
24 Nov 2004 - added semi-abstract implementation for Constraint.variables()
Classes | ||||||||||||||||||
|
Functions | ||
|