Public Member Functions | |
| HashArray (const int &initSize=0) | |
| HashArray (const HashArray< Type, HashFn, EqualFn > &x) | |
| ~HashArray () | |
| int | append (Type item) |
| int | append (Type item, const int &max) |
| int | append (const HashArray< Type, HashFn, EqualFn > &newItems) |
| int | append (const HashArray< Type, HashFn, EqualFn > *const &items) |
| int | copyFrom (const HashArray< Type, HashFn, EqualFn > &items) |
| bool | growToSize (const int &newSize) |
| bool | growToSize (const int &newSize, Type fill) |
| void | clear () |
| void | clearAndCompress () |
| void | deleteItemsAndClear () |
| void | deleteItemsAndClearCompress () |
| int | size () const |
| bool | empty () const |
| const Type & | operator[] (const int &index) const |
| Type & | lastItem () const |
| const Type * | getItems () const |
| int | find (Type const &item) const |
| Finds an item in this HashArray. | |
| bool | contains (Type const &item) const |
| Type | removeItem (const int &index) |
| Type | removeItem (Type &item) |
| Type | removeLastItem () |
| Type | removeItemFastDisorder (const int &index) |
| Type | removeItemFastDisorder (Type &item) |
| void | compress () |
| void | shuffle () |
| int | getMaxIndex () |
| Type | getMaxValue () |
Definition at line 81 of file hasharray.h.
| int HashArray< Type, HashFn, EqualFn >::find | ( | Type const & | item | ) | const [inline] |
Finds an item in this HashArray.
| item | Item to be found. |
Definition at line 260 of file hasharray.h.
Referenced by LWInfo::activateRandomAtom(), LazyInfo::activateRandomAtom(), VariableState::addOneAtomToEachBlock(), MLN::appendClause(), Clause::checkPredsAreConnected(), HashArray< Type, HashFn, EqualFn >::contains(), IndexTranslator::createClauseIdxToClauseFormulaIdxsMap(), VariableState::fillLazyBlocks(), MLN::findClauseIdx(), VariableState::getActiveClauses(), MLN::getClausesOfFormula(), MLN::getFormulaWt(), LWInfo::getSupersetClauses(), LazyInfo::getSupersetClauses(), LWInfo::getUnSatCostPerPred(), LazyInfo::getUnSatCostPerPred(), LWInfo::getWalksatClauses(), LazyInfo::getWalksatClauses(), GroundClause::GroundClause(), IntClause::IntClause(), Clause::moveTermsFromUnseenToSeen(), HashArray< Type, HashFn, EqualFn >::removeItem(), HashArray< Type, HashFn, EqualFn >::removeItemFastDisorder(), VariableState::setAsEvidence(), MLN::setFormulaIsExistUnique(), MLN::setFormulaIsHard(), MLN::setFormulaNumPreds(), MLN::setFormulaPriorMean(), MLN::setFormulaWt(), and IndexTranslator::setPriorMeans().
00261 { 00262 typename hash_map<Type, int, HashFn, EqualFn>::iterator it=map_->find(item); 00263 if (it == map_->end()) return -1; 00264 assert((*it).second >= 0); 00265 return (*it).second; 00266 }
1.5.1