yay, my first commit
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define HORUS_PARFACTORLIST_H
|
||||
|
||||
#include <list>
|
||||
#include <queue>
|
||||
|
||||
#include "Parfactor.h"
|
||||
#include "ProbFormula.h"
|
||||
@@ -14,56 +15,82 @@ class ParfactorList
|
||||
{
|
||||
public:
|
||||
ParfactorList (void) { }
|
||||
ParfactorList (Parfactors&);
|
||||
list<Parfactor*>& getParfactors (void) { return pfList_; }
|
||||
const list<Parfactor*>& getParfactors (void) const { return pfList_; }
|
||||
|
||||
void add (Parfactor* pf);
|
||||
void add (Parfactors& pfs);
|
||||
void addShattered (Parfactor* pf);
|
||||
list<Parfactor*>::iterator remove (list<Parfactor*>::iterator);
|
||||
list<Parfactor*>::iterator deleteAndRemove (list<Parfactor*>::iterator);
|
||||
ParfactorList (const ParfactorList&);
|
||||
|
||||
void clear (void) { pfList_.clear(); }
|
||||
unsigned size (void) const { return pfList_.size(); }
|
||||
|
||||
ParfactorList (const Parfactors&);
|
||||
|
||||
void shatter (void);
|
||||
~ParfactorList (void);
|
||||
|
||||
const list<Parfactor*>& parfactors (void) const { return pfList_; }
|
||||
|
||||
void clear (void) { pfList_.clear(); }
|
||||
|
||||
unsigned size (void) const { return pfList_.size(); }
|
||||
|
||||
typedef std::list<Parfactor*>::iterator iterator;
|
||||
|
||||
iterator begin (void) { return pfList_.begin(); }
|
||||
iterator end (void) { return pfList_.end(); }
|
||||
|
||||
iterator end (void) { return pfList_.end(); }
|
||||
|
||||
typedef std::list<Parfactor*>::const_iterator const_iterator;
|
||||
|
||||
const_iterator begin (void) const { return pfList_.begin(); }
|
||||
const_iterator end (void) const { return pfList_.end(); }
|
||||
|
||||
const_iterator end (void) const { return pfList_.end(); }
|
||||
|
||||
void add (Parfactor* pf);
|
||||
|
||||
void add (const Parfactors& pfs);
|
||||
|
||||
void addShattered (Parfactor* pf);
|
||||
|
||||
list<Parfactor*>::iterator insertShattered (
|
||||
list<Parfactor*>::iterator, Parfactor*);
|
||||
|
||||
list<Parfactor*>::iterator remove (list<Parfactor*>::iterator);
|
||||
|
||||
list<Parfactor*>::iterator removeAndDelete (list<Parfactor*>::iterator);
|
||||
|
||||
bool isAllShattered (void) const;
|
||||
|
||||
void print (void) const;
|
||||
|
||||
private:
|
||||
|
||||
bool isShattered (const Parfactor*, const Parfactor*) const;
|
||||
|
||||
static std::pair<Parfactors, Parfactors> shatter (
|
||||
ProbFormulas&,
|
||||
Parfactor*,
|
||||
ProbFormulas&,
|
||||
Parfactor*);
|
||||
void addToShatteredList (Parfactor*);
|
||||
|
||||
std::pair<Parfactors, Parfactors> shatter (
|
||||
Parfactor*, Parfactor*);
|
||||
|
||||
static std::pair<Parfactors, Parfactors> shatter (
|
||||
ProbFormula&,
|
||||
Parfactor*,
|
||||
ProbFormula&,
|
||||
Parfactor*);
|
||||
std::pair<Parfactors, Parfactors> shatter (
|
||||
ProbFormula&, Parfactor*, ProbFormula&, Parfactor*);
|
||||
|
||||
static Parfactors shatter (
|
||||
Parfactor*,
|
||||
const ProbFormula&,
|
||||
ConstraintTree*,
|
||||
ConstraintTree*,
|
||||
unsigned);
|
||||
Parfactors shatter (
|
||||
Parfactor*,
|
||||
const ProbFormula&,
|
||||
ConstraintTree*,
|
||||
ConstraintTree*,
|
||||
unsigned);
|
||||
|
||||
void unifyGroups (unsigned group1, unsigned group2);
|
||||
void unifyGroups (unsigned group1, unsigned group2);
|
||||
|
||||
list<Parfactor*> pfList_;
|
||||
bool proper (
|
||||
const ProbFormula&, ConstraintTree,
|
||||
const ProbFormula&, ConstraintTree) const;
|
||||
|
||||
bool identical (
|
||||
const ProbFormula&, ConstraintTree,
|
||||
const ProbFormula&, ConstraintTree) const;
|
||||
|
||||
bool disjoint (
|
||||
const ProbFormula&, ConstraintTree,
|
||||
const ProbFormula&, ConstraintTree) const;
|
||||
|
||||
list<Parfactor*> pfList_;
|
||||
};
|
||||
|
||||
#endif // HORUS_PARFACTORLIST_H
|
||||
|
Reference in New Issue
Block a user