Public Member Functions | |
| GroundPredicate (Predicate *const &pred) | |
| ~GroundPredicate () | |
| void | deleteGndClauseSet () |
| void | removeGndClauses () |
| Removes the ground clauses from this ground predicate. | |
| Predicate * | createEquivalentPredicate (const Domain *const &domain) const |
| Creates a Predicate* equivalent to this GroundPredicate. | |
| unsigned int | getId () const |
| unsigned int | getTermId (const int &idx) const |
| unsigned int | getNumTerms () const |
| bool | getTruthValue () const |
| void | setTruthValue (const bool &tv) |
| double | getWtWhenFalse () const |
| void | setWtWhenFalse (const double &wt) |
| void | addWtWhenFalse (const double &wt) |
| double | getWtWhenTrue () const |
| void | setWtWhenTrue (const double &wt) |
| void | addWtWhenTrue (const double &wt) |
| double | getProbability () |
| void | compress () |
| size_t | hashCode () |
| const Array< unsigned int > * | getIntArrRep () const |
| void | appendIntArrRep (Array< unsigned int > &rep) |
| bool | appendGndClause (GroundClause *const &gc, const bool &senseInGndClause) |
| const Array< GroundClause * > * | getNegGndClauses () const |
| const Array< GroundClause * > * | getPosGndClauses () const |
| int | getNumGndClauses () const |
| bool | same (const GroundPredicate *const &gp) |
| void | print (ostream &out, const Domain *const &domain) const |
| void | print (ostream &out) const |
| double | sizeKB () |
| Computes and returns the size of this ground predicate. | |
Definition at line 74 of file groundpredicate.h.
| void GroundPredicate::removeGndClauses | ( | ) | [inline] |
Removes the ground clauses from this ground predicate.
The gndClauseSet_ is deleted and the gndClauses_ Array is reset.
Definition at line 115 of file groundpredicate.h.
References deleteGndClauseSet().
00116 { 00117 deleteGndClauseSet(); 00118 delete negGndClauses_; 00119 delete posGndClauses_; 00120 negGndClauses_ = new Array<GroundClause*>; 00121 posGndClauses_ = new Array<GroundClause*>; 00122 }
| Predicate* GroundPredicate::createEquivalentPredicate | ( | const Domain *const & | domain | ) | const [inline] |
Creates a Predicate* equivalent to this GroundPredicate.
The caller is responsible for deleting the returned Predicate*.
Definition at line 128 of file groundpredicate.h.
References Predicate::appendTerm(), getId(), PredicateTemplate::getNumTerms(), Domain::getPredicateTemplate(), and getTermId().
00129 { 00130 const PredicateTemplate* pt = domain->getPredicateTemplate(getId()); 00131 assert(pt); 00132 Predicate* pred = new Predicate(pt); 00133 for (int j = 0; j < pt->getNumTerms(); j++) 00134 pred->appendTerm(new Term(getTermId(j), (void*)pred, true)); 00135 return pred; 00136 }
1.5.1