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) |
| HashArray< Type, HashFn, EqualFn > & | operator= (const HashArray< Type, HashFn, EqualFn > &x) |
| 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 | removeInputItem (Type &item) |
| Type | removeLastItem () |
| Type | removeItemFastDisorder (const int &index) |
| Type | removeInputItemFastDisorder (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 259 of file hasharray.h.
Referenced by SuperClause::addConstantTuple(), MLN::appendClause(), Clause::checkPredsAreConnected(), HashArray< Type, HashFn, EqualFn >::contains(), IndexTranslator::createClauseIdxToClauseFormulaIdxsMap(), MLN::findClauseIdx(), VariableState::fixAtom(), HVariableState::fixAtom(), VariableState::getActiveClauses(), HVariableState::getActiveClauses(), MLN::getClausesOfFormula(), MLN::getFormulaWt(), Variable::getImplicitIndex(), VariableState::getIndexOfGroundPredicate(), VariableState::getIndexOfRandomAtom(), VariableState::getTrueFixedAtomInBlock(), SuperClause::getTupleIndex(), GroundClause::GroundClause(), SuperClause::incrementTupleCount(), VariableState::initBlocksRandom(), HVariableState::initBlocksRandom(), Variable::isImplicit(), Clause::moveTermsFromUnseenToSeen(), Variable::removeImplicit(), HashArray< Type, HashFn, EqualFn >::removeInputItem(), HashArray< Type, HashFn, EqualFn >::removeInputItemFastDisorder(), VariableState::setAsEvidence(), MLN::setFormulaIsExistUnique(), MLN::setFormulaIsHard(), MLN::setFormulaNumPreds(), MLN::setFormulaPriorMean(), MLN::setFormulaWt(), VariableState::setOthersInBlockToFalse(), HVariableState::setOthersInBlockToFalse(), and IndexTranslator::setPriorMeans().
00260 { 00261 typename hash_map<Type, int, HashFn, EqualFn>::iterator it=map_->find(item); 00262 if (it == map_->end()) return -1; 00263 assert((*it).second >= 0); 00264 return (*it).second; 00265 }
1.5.1