Logo Search packages:      
Sourcecode: tagcoll version File versions  Download package

template<class ITEM, class TAG>
CardinalityStore< ITEM, TAG > CardinalityStore::getCollectionWithoutTags ( const OpSet< TAG > &  tag  )  const [inline]

Return a tagged collection with all tagsets of this one that are nonempty when stripped by the tag `tag' and all tags that imply it

Definition at line 411 of file CardinalityStore.cc.

References Tagcoll::Consumer< ITEM, TAG >::consume(), and Tagcoll::CardinalityStore< ITEM, TAG >::getImplyingOneOf().

{
      OpSet<TAG> candidates = getImplyingOneOf(tags);

      // remove all tags contained in `candidates', merging categories that
      // result with the same tagset;

      CardinalityStore<ITEM, TAG> res;
      for (typename tagsets_t::const_iterator ts = tagsets.begin();
                  ts != tagsets.end(); ts++)
      {
            OpSet<TAG> newts = ts->first - candidates;

            if (newts.size() > 0)
            {
                  // Insert the newfound tagset in the new collection
                  //res.add(newts, ts->second);
                  res.consume(ts->second, ts->first);
            }
      }

      return res;
}


Generated by  Doxygen 1.6.0   Back to index