PLearn 0.1
Public Member Functions
PLearn::Set Class Reference

#include <Set.h>

Inheritance diagram for PLearn::Set:
Inheritance graph
[legend]
Collaboration diagram for PLearn::Set:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Set ()
 Set (PPointableSet *p)
bool contains (int elem)
SetIterator find (int elem)
void insert (int elem)
int size ()
bool isEmpty ()
void remove (int elem)
void clear ()
void replace (int old_elem, int new_elem)
void merge (Set s)
void difference (Set s)
void intersection (Set s)
SetIterator begin ()
SetIterator end ()
bool operator== (Set &s)
bool operator!= (Set &s)

Detailed Description

Definition at line 24 of file Set.h.


Constructor & Destructor Documentation

PLearn::Set::Set ( ) [inline]

Definition at line 29 of file Set.h.

: PP<PPointableSet>(new PPointableSet) {}
PLearn::Set::Set ( PPointableSet p) [inline]

Definition at line 30 of file Set.h.

: PP<PPointableSet>(p) {}

Member Function Documentation

SetIterator PLearn::Set::begin ( ) [inline]

Definition at line 75 of file Set.h.

Referenced by PLearn::TextSenseSequenceVMatrix::build_(), PLearn::GraphicalBiText::build_(), PLearn::check_prob(), PLearn::GraphicalBiText::check_set_pA(), PLearn::GraphicalBiText::compute_BN_likelihood(), PLearn::GraphicalBiText::compute_efs_likelihood(), PLearn::GraphicalBiText::compute_likelihood(), PLearn::GraphicalBiText::compute_node_level(), PLearn::GraphicalBiText::compute_nodemap(), PLearn::GraphicalBiText::compute_pMC(), PLearn::GraphicalBiText::compute_pTC(), PLearn::GraphicalBiText::computeKL(), PLearn::WordNetOntology::computeWordSenseUniqueIds(), PLearn::difference(), difference(), PLearn::GraphicalBiText::distribute_pS_on_ancestors(), PLearn::WordNetOntology::extractAncestors(), PLearn::WordNetOntology::extractDescendants(), PLearn::WordNetOntology::extractStrictDescendants(), PLearn::WordNetOntology::extractWordHighLevelSenses(), PLearn::WordNetOntology::extractWordNounAndVerbHighLevelSenses(), PLearn::WordNetOntology::fillTempWordToHighLevelSensesTVecMap(), PLearn::WordNetOntology::fillTempWordToSensesTVecMap(), PLearn::WordNetOntology::getCategoriesAtLevel(), PLearn::WordNetOntology::getCategoriesUnderLevel(), PLearn::GraphicalBiText::getDeepestCommonAncestor(), PLearn::WordNetOntology::getDescendantCategoriesAtLevel(), PLearn::WordNetOntology::getDownToUpParentCategoriesAtLevel(), PLearn::WordNetOntology::getPredominentSyntacticClassForWord(), PLearn::WordNetOntology::getSecondLevelSensesForWord(), PLearn::WordNetOntology::getSyntacticClassesForWord(), PLearn::WordNetOntology::getSyntacticClassForSense(), PLearn::WordNetOntology::getThirdLevelSensesForWord(), PLearn::GraphicalBiText::init(), PLearn::WordNetOntology::intersectAncestorsAndSenses(), PLearn::intersection(), intersection(), PLearn::merge(), merge(), PLearn::operator<<(), PLearn::WordNetOntology::overlappingSynsets(), PLearn::print(), PLearn::GraphicalBiText::print(), PLearn::GraphicalBiText::print_sensemap(), PLearn::GraphicalBiText::printNode(), PLearn::WordNetOntology::printNodes(), PLearn::WordNetOntology::printOntology(), PLearn::WordNetOntology::printWordAncestors(), PLearn::WordNetOntology::propagatePOSTypes(), PLearn::WordNetOntology::reduceWordPolysemy(), PLearn::WordNetOntology::reduceWordPolysemy_preserveSenseOverlapping(), PLearn::ProbabilitySparseMatrix::removeExtra(), PLearn::WordNetOntology::removeNonReachableSynsets(), PLearn::ProbabilitySparseMatrix::removeRow(), PLearn::samePos(), PLearn::WordNetOntology::save(), PLearn::GraphicalBiText::set_nodemap(), PLearn::GraphicalBiText::test_WSD(), PLearn::WordNetOntology::unvisitDownward(), PLearn::update(), PLearn::updateAndClearCounts(), and PLearn::WordNetOntology::visitUpward().

{ return ptr->begin(); }
void PLearn::Set::clear ( ) [inline]
bool PLearn::Set::contains ( int  elem) [inline]
void PLearn::Set::difference ( Set  s) [inline]

Definition at line 57 of file Set.h.

References begin(), and end().

    {
        Set res;
        set_difference(begin(), end(),
                       s.begin(), s.end(),
                       insert_iterator<PPointableSet>(*res, res.begin()));
        *ptr = *res;
    }

Here is the call graph for this function:

SetIterator PLearn::Set::end ( ) [inline]

Definition at line 76 of file Set.h.

Referenced by PLearn::TextSenseSequenceVMatrix::build_(), PLearn::GraphicalBiText::build_(), PLearn::check_prob(), PLearn::GraphicalBiText::check_set_pA(), PLearn::GraphicalBiText::compute_BN_likelihood(), PLearn::GraphicalBiText::compute_efs_likelihood(), PLearn::GraphicalBiText::compute_likelihood(), PLearn::GraphicalBiText::compute_node_level(), PLearn::GraphicalBiText::compute_nodemap(), PLearn::GraphicalBiText::compute_pMC(), PLearn::GraphicalBiText::compute_pTC(), PLearn::GraphicalBiText::computeKL(), PLearn::WordNetOntology::computeWordSenseUniqueIds(), PLearn::difference(), difference(), PLearn::GraphicalBiText::distribute_pS_on_ancestors(), PLearn::WordNetOntology::extractAncestors(), PLearn::WordNetOntology::extractDescendants(), PLearn::WordNetOntology::extractStrictDescendants(), PLearn::WordNetOntology::extractWordHighLevelSenses(), PLearn::WordNetOntology::extractWordNounAndVerbHighLevelSenses(), PLearn::WordNetOntology::fillTempWordToHighLevelSensesTVecMap(), PLearn::WordNetOntology::fillTempWordToSensesTVecMap(), PLearn::WordNetOntology::getCategoriesAtLevel(), PLearn::WordNetOntology::getCategoriesUnderLevel(), PLearn::GraphicalBiText::getDeepestCommonAncestor(), PLearn::WordNetOntology::getDescendantCategoriesAtLevel(), PLearn::WordNetOntology::getDownToUpParentCategoriesAtLevel(), PLearn::WordNetOntology::getPredominentSyntacticClassForWord(), PLearn::WordNetOntology::getSecondLevelSensesForWord(), PLearn::WordNetOntology::getSyntacticClassesForWord(), PLearn::WordNetOntology::getThirdLevelSensesForWord(), PLearn::GraphicalBiText::init(), PLearn::WordNetOntology::intersectAncestorsAndSenses(), PLearn::intersection(), intersection(), PLearn::merge(), merge(), PLearn::operator<<(), PLearn::WordNetOntology::overlappingSynsets(), PLearn::print(), PLearn::GraphicalBiText::print(), PLearn::GraphicalBiText::print_sensemap(), PLearn::GraphicalBiText::printNode(), PLearn::WordNetOntology::printNodes(), PLearn::WordNetOntology::printOntology(), PLearn::WordNetOntology::printWordAncestors(), PLearn::WordNetOntology::propagatePOSTypes(), PLearn::WordNetOntology::reduceWordPolysemy(), PLearn::WordNetOntology::reduceWordPolysemy_preserveSenseOverlapping(), PLearn::ProbabilitySparseMatrix::removeExtra(), PLearn::WordNetOntology::removeNonReachableSynsets(), PLearn::ProbabilitySparseMatrix::removeRow(), PLearn::samePos(), PLearn::WordNetOntology::save(), PLearn::GraphicalBiText::sensetag_valid_bitext(), PLearn::GraphicalBiText::senseTagBitext(), PLearn::GraphicalBiText::set_nodemap(), PLearn::GraphicalBiText::test_WSD(), PLearn::WordNetOntology::unvisitDownward(), PLearn::update(), PLearn::GraphicalBiText::update_WSD_model(), PLearn::updateAndClearCounts(), and PLearn::WordNetOntology::visitUpward().

{ return ptr->end(); }
SetIterator PLearn::Set::find ( int  elem) [inline]
void PLearn::Set::insert ( int  elem) [inline]

Definition at line 34 of file Set.h.

Referenced by PLearn::GraphicalBiText::build_(), PLearn::GraphicalBiText::compute_BN_likelihood(), PLearn::GraphicalBiText::compute_efs_likelihood(), PLearn::WordNetOntology::createBaseSynsets(), PLearn::WordNetOntology::extractAncestors(), PLearn::WordNetOntology::extractDescendants(), PLearn::WordNetOntology::extractOntology(), PLearn::WordNetOntology::extractSenses(), PLearn::WordNetOntology::extractStrictDescendants(), PLearn::WordNetOntology::getAllCategories(), PLearn::WordNetOntology::getAllSenses(), PLearn::WordNetOntology::getAllWords(), PLearn::WordNetOntology::getCategoriesUnderLevel(), PLearn::GraphicalBiText::getDeepestCommonAncestor(), PLearn::WordNetOntology::getDescendantCategoriesAtLevel(), PLearn::WordNetOntology::getDownToUpParentCategoriesAtLevel(), PLearn::WordNetOntology::getSecondLevelSensesForWord(), PLearn::WordNetOntology::getSyntacticClassesForWord(), PLearn::WordNetOntology::getThirdLevelSensesForWord(), PLearn::WordNetOntology::getWordAncestors(), PLearn::WordNetOntology::intersectAncestorsAndSenses(), PLearn::WordNetOntology::linkUpperCategories(), PLearn::WordNetOntology::load(), PLearn::WordNetOntology::overlappingSynsets(), PLearn::WordNetOntology::processUnknownWord(), PLearn::WordNetOntology::propagatePOSTypes(), PLearn::WordNetOntology::reduceWordPolysemy(), PLearn::WordNetOntology::reduceWordPolysemy_preserveSenseOverlapping(), PLearn::ProbabilitySparseMatrix::removeExtra(), and PLearn::WordNetOntology::removeNonReachableSynsets().

{ ptr->insert(elem); }

Here is the caller graph for this function:

void PLearn::Set::intersection ( Set  s) [inline]

Definition at line 66 of file Set.h.

References begin(), and end().

    {
        Set res;
        set_intersection(begin(), end(),
                         s.begin(), s.end(),
                         insert_iterator<PPointableSet>(*res, res.begin()));
        *ptr = *res;
    }

Here is the call graph for this function:

bool PLearn::Set::isEmpty ( ) [inline]

Definition at line 36 of file Set.h.

Referenced by PLearn::WordNetOntology::detectWordsWithoutOntology(), and PLearn::WordNetOntology::reduceWordPolysemy_preserveSenseOverlapping().

{ return (ptr->size() == 0); }

Here is the caller graph for this function:

void PLearn::Set::merge ( Set  s) [inline]

Definition at line 46 of file Set.h.

References begin(), and end().

Referenced by PLearn::WordNetOntology::extractAncestors(), and PLearn::WordNetOntology::getWordAncestors().

    {
//     Set res;
//     set_union(begin(), end(),
//               s.begin(), s.end(),
//               insert_iterator<PPointableSet>(*res, res.begin()));
//     *ptr = *res;
        for (SetIterator it = s.begin(); it != s.end(); ++it)
            insert(*it);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::Set::operator!= ( Set s) [inline]

Definition at line 79 of file Set.h.

References PLearn::PP< T >::ptr.

{ return *ptr != *s.ptr; }
bool PLearn::Set::operator== ( Set s) [inline]

Definition at line 78 of file Set.h.

References PLearn::PP< T >::ptr.

{ return *ptr == *s.ptr; }
void PLearn::Set::remove ( int  elem) [inline]

Definition at line 37 of file Set.h.

Referenced by PLearn::WordNetOntology::removeNonReachableSynsets().

{ ptr->erase(elem); }

Here is the caller graph for this function:

void PLearn::Set::replace ( int  old_elem,
int  new_elem 
) [inline]

Definition at line 40 of file Set.h.

    {
        remove(old_elem);
        insert(new_elem);
    }
int PLearn::Set::size ( ) [inline]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines