bool ColouredGraphNodePredicates::isEquivalentTo(const Predicate& predicate, int invariables, const std::vector<const Object*>& objects) const
{
	if (predicate.getName() != predicates_->getName() || predicate.getArity() != predicates_->getArity() || invariables != invariables_ || objects_.size() != objects.size())
	{
		return false;
	}
	
	for (unsigned int i = 0; i < objects.size(); ++i)
	{
		if ((int)i != invariables && objects[i] != objects_[i])
		{
			return false;
		}
	}
	return true;
}
Exemple #2
0
bool Predicate::operator ==(Predicate& p) {
	  return strcmp(p.getName().c_str(),this->getName().c_str())==0 && p.getArity()==this->getArity();
}