CellFilter CellFilter::intersection(const CellFilter& other) const 
{
  if (isNull() || other.isNull())
  {
    CellFilter rtn;
    return rtn;
  }
  else if (isKnownDisjointWith(other) || other.isKnownDisjointWith(*this))
  {
    CellFilter rtn;
    return rtn;
  }
  else if (isKnownSubsetOf(other))
  {
    return *this;
  }
  else if (other.isKnownSubsetOf(*this))
  {
    return other;
  }
  else if (*this==other)
  {
    return *this;
  }
  else
  {
    CellFilter rtn 
      = new BinaryCellFilter(*this, other, BinaryCellFilter::Intersection);
    other.registerSubset(rtn);
    this->registerSubset(rtn);
    
    return rtn;
  }
}
CellFilter CellFilter::operator+(const CellFilter& other) const 
{
  if (isNull())
  {
    return other;
  }
  else if (other.isNull())
  {
    return *this;
  }
  else
  {
    CellFilter rtn 
      = new BinaryCellFilter(*this, other, BinaryCellFilter::Union);
    rtn.registerSubset(*this);
    rtn.registerSubset(other);
    return rtn;
  }
}