Currently, PatternDatabase objects are created from their constructor. This involves computing hash multipliers for hashing states, abstract operators and a match tree for successor (or rather predecessor) generation, and distances for the actual PDB. Separating these steps into individual functions/factory classes has the benefit that one can use these parts independently of computing a PDB. It further allows to hook into the PDB computation to compute any additional information as a side product, without affect the PDB interface. issue1007 shows a use case for this scenario, and two other projects I've recently worked on would benefit from this.
|