#ifndef HORUS_PARFACTORLIST_H #define HORUS_PARFACTORLIST_H #include #include "Parfactor.h" #include "ProbFormula.h" using namespace std; class ParfactorList { public: ParfactorList (void) { } ParfactorList (Parfactors&); list& getParfactors (void) { return pfList_; } const list& getParfactors (void) const { return pfList_; } void add (Parfactor* pf); void add (Parfactors& pfs); void addShattered (Parfactor* pf); list::iterator remove (list::iterator); list::iterator deleteAndRemove (list::iterator); void clear (void) { pfList_.clear(); } unsigned size (void) const { return pfList_.size(); } void shatter (void); typedef std::list::iterator iterator; iterator begin (void) { return pfList_.begin(); } iterator end (void) { return pfList_.end(); } typedef std::list::const_iterator const_iterator; const_iterator begin (void) const { return pfList_.begin(); } const_iterator end (void) const { return pfList_.end(); } void print (void) const; private: static std::pair shatter ( ProbFormulas&, Parfactor*, ProbFormulas&, Parfactor*); static std::pair shatter ( ProbFormula&, Parfactor*, ProbFormula&, Parfactor*); static Parfactors shatter ( Parfactor*, const ProbFormula&, ConstraintTree*, ConstraintTree*, unsigned); void unifyGroups (unsigned group1, unsigned group2); list pfList_; }; #endif // HORUS_PARFACTORLIST_H