WPettersson / regina

Regina - a topological software suite
Other
1 stars 0 forks source link

Create generic Census class #8

Open WPettersson opened 8 years ago

WPettersson commented 8 years ago

Currently any code that runs a census will have a pointer to an NGluingPermSearcher object (or more likely, something which inherits from NGluingPermSearcher). But this means any code which will integrate with these will also have to inherit from NGluingPermSearcher even if the class doesn't need the specifics of NGluingPermSearcher.

I propose a generic Census class, which could hold members such as runSearch(), use_, useArgs, whichPurge_, orientableOnly_ and so-on, but not hold members such as order, orderSize, orderElt.

This will mean some changes to UseGluingPerms and related. A census should produce triangulations, so I think UseGluingPerms should be changed from void (*UseGluingPerms)(const NGluingPermSearcher*, void*) to void (*UseTriangulation)(const NTriangulation*, void*)

For existing classes, we just change use_(this, useArgs_) to use_(this->triangulate(), useArgs_), but newer census classes can now construct triangulations in different manners (or have them already constructed).