|
AGXDynamics
2.31.1.0
|
#include <QuadraticProbingHashTable.h>
Inheritance diagram for agx::QuadraticProbingHashTable< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >:Public Types | |
| enum | ClearPolicy { SHRINK_BUFFER, SHRINK_BUFFER_AVERAGED, MAINTAIN_BUFFER } |
| agxData::Values from this enumeration is passed to the subclasses' 'clear' method in order to control what should become of the container's memory. More... | |
| typedef Implementation::const_iterator | const_iterator |
| typedef HashT | hash_fn_type |
| typedef QuadraticProbingHashTableImplementation < agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT > | Implementation |
| typedef Implementation::iterator | iterator |
| typedef agx::ref_ptr< KeyT > | key_type |
| typedef DataT | value_type |
Public Member Functions | |
| QuadraticProbingHashTable (const AllocatorT &allocator=AllocatorT()) | |
| AllocatorT & | allocator () |
| const AllocatorT & | allocator () const |
| iterator | begin () |
| Iterator to first element in hash table. More... | |
| const_iterator | begin () const |
| size_t | capacity () const |
| Returns the size of the memory are used by the container to store its elements. More... | |
| void | clear (ClearPolicy policy=SHRINK_BUFFER_AVERAGED) |
| Remove all elements. More... | |
| bool | contains (const agx::ref_ptr< KeyT > &key) const |
| Boolean query to test existence of an element. More... | |
| bool | contains (const KeyT *key) const |
| bool | empty () const |
| iterator | end () |
| Iterator marking end of hash table. More... | |
| const_iterator | end () const |
| bool | erase (const agx::ref_ptr< KeyT > &key) |
| Erase an element from the hash table. More... | |
| iterator | erase (const iterator &it) |
| Erase an element using an iterator. More... | |
| bool | erase (const KeyT *key) |
| iterator | find (const agx::ref_ptr< KeyT > &key) |
| Find an element. More... | |
| const_iterator | find (const agx::ref_ptr< KeyT > &key) const |
| iterator | find (const KeyT *key) |
| const_iterator | find (const KeyT *key) const |
| const Bucket * | getBucketBuffer () const |
| size_t | getMaxProbeLength () const |
| size_t | getNumBuckets () const |
| DataT & | getOrCreate (const agx::ref_ptr< KeyT > &key) |
| Returns value given key. More... | |
| insert_iterator | insert (const agx::ref_ptr< KeyT > &key, const DataT &data) |
| Insert an element, overwriting if key already exists. More... | |
| DataT & | operator[] (const agx::ref_ptr< KeyT > &key) |
| Index operator for accessing elements in the hash, inserting it if not found. More... | |
| const DataT & | operator[] (const agx::ref_ptr< KeyT > &key) const |
| void * | ptr () |
| const void * | ptr () const |
| void | purge (T purger) |
| Purge the hash table. More... | |
| void | reserve (size_t size) |
| Reserve capacity in the hash table. More... | |
| size_t | size () const |
Protected Member Functions | |
| Bucket * | buckets () const |
| bool | eraseBucket (size_t index) |
| size_t | findBucket (const T2 &key) const |
| size_t & | numBuckets () |
| size_t | numBuckets () const |
| size_t & | numFilled () |
| size_t | numFilled () const |
| void | rebuild (size_t size) |
| Rebuild, and optionally resize hash table. More... | |
Protected Attributes | |
| void * | m_buffer |
| size_t | m_capacity |
| size_t | m_size |
Definition at line 709 of file QuadraticProbingHashTable.h.
| typedef Implementation::const_iterator agx::QuadraticProbingHashTable< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >::const_iterator |
Definition at line 714 of file QuadraticProbingHashTable.h.
|
inherited |
Definition at line 52 of file QuadraticProbingHashTable.h.
| typedef QuadraticProbingHashTableImplementation<agx::ref_ptr<KeyT>, DataT, HashT, AllocatorT> agx::QuadraticProbingHashTable< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >::Implementation |
Definition at line 712 of file QuadraticProbingHashTable.h.
| typedef Implementation::iterator agx::QuadraticProbingHashTable< agx::ref_ptr< KeyT >, DataT, HashT, AllocatorT >::iterator |
Definition at line 713 of file QuadraticProbingHashTable.h.
|
inherited |
Definition at line 51 of file QuadraticProbingHashTable.h.
|
inherited |
Definition at line 50 of file QuadraticProbingHashTable.h.
|
inherited |
agxData::Values from this enumeration is passed to the subclasses' 'clear' method in order to control what should become of the container's memory.
Definition at line 42 of file Container.h.
|
inline |
Definition at line 716 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Definition at line 565 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Definition at line 566 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Iterator to first element in hash table.
Definition at line 419 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Definition at line 422 of file QuadraticProbingHashTable.h.
|
inlineprotectedinherited |
Definition at line 586 of file QuadraticProbingHashTable.h.
|
inherited |
Returns the size of the memory are used by the container to store its elements.
Some types of containers, e.g. the agx::Vector, will not do a reallocation until the size of the container reaches the capacity. However, this is not the case for e.g., agx::HashTable, which may perform a reallocation earlier.
Definition at line 135 of file Container.h.
References agx::Container::m_capacity.
Referenced by agx::Vector< T, Allocator >::operator=().
|
inlineinherited |
Remove all elements.
Definition at line 458 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Boolean query to test existence of an element.
Definition at line 397 of file QuadraticProbingHashTable.h.
|
inline |
|
inherited |
Definition at line 136 of file Container.h.
References agx::Container::m_size.
Referenced by agx::WireContactConstraint::addWireParticle(), agx::WireContactSpringConstraint::calculateJacobian(), agx::createMissingTiers(), agxCollide::Space::disableForContacts(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::empty(), agx::SetVector< const agxPowerLine::Unit * >::empty(), agxSDK::SimulationFrameReader::DirtySet::empty(), agx::WireContactConstraint::getInvMass(), agx::WireContactConstraint::getJacobian(), and agx::WireContactConstraint::getMass().
|
inlineinherited |
Iterator marking end of hash table.
Definition at line 429 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Definition at line 432 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Erase an element from the hash table.
Definition at line 440 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Erase an element using an iterator.
Definition at line 449 of file QuadraticProbingHashTable.h.
|
inline |
|
inlineprotectedinherited |
Definition at line 659 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Find an element.
Definition at line 405 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Definition at line 410 of file QuadraticProbingHashTable.h.
|
inline |
Definition at line 726 of file QuadraticProbingHashTable.h.
References agx::QuadraticProbingHashTableImplementation< KeyT, DataT, HashT, AllocatorT >::findBucket().
|
inline |
Definition at line 731 of file QuadraticProbingHashTable.h.
References agx::QuadraticProbingHashTableImplementation< KeyT, DataT, HashT, AllocatorT >::findBucket().
|
inlineprotectedinherited |
Definition at line 632 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Definition at line 573 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Definition at line 574 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Definition at line 575 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Returns value given key.
If the key doesn't exist, the key is inserted and the default value is returned.
| key | - key |
Definition at line 321 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Insert an element, overwriting if key already exists.
Definition at line 330 of file QuadraticProbingHashTable.h.
|
inlineprotectedinherited |
Definition at line 583 of file QuadraticProbingHashTable.h.
|
inlineprotectedinherited |
Definition at line 587 of file QuadraticProbingHashTable.h.
|
inlineprotectedinherited |
Definition at line 584 of file QuadraticProbingHashTable.h.
|
inlineprotectedinherited |
Definition at line 588 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Index operator for accessing elements in the hash, inserting it if not found.
| key | - The key to look for |
Definition at line 299 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Definition at line 308 of file QuadraticProbingHashTable.h.
|
inherited |
Definition at line 137 of file Container.h.
References agx::Container::m_buffer.
|
inherited |
Definition at line 138 of file Container.h.
References agx::Container::m_buffer.
|
inlineinherited |
Purge the hash table.
Good to use when removing multiple items, since iterators are invalidated after any modification. The purger should be a functor class which takes the key and value as parameters and return true if the pair should be removed from the hash table.
Definition at line 543 of file QuadraticProbingHashTable.h.
|
inlineprotectedinherited |
Rebuild, and optionally resize hash table.
Definition at line 594 of file QuadraticProbingHashTable.h.
|
inlineinherited |
Reserve capacity in the hash table.
Definition at line 528 of file QuadraticProbingHashTable.h.
|
inherited |
Definition at line 134 of file Container.h.
References agx::Container::m_size.
Referenced by agxCollide::GroupFooCollider< ShapeType >::_calculateContacts(), agxData::Array< T >::Array(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::back(), agx::SetVector< const agxPowerLine::Unit * >::back(), agx::WireContactConstraint::calculateD(), agx::WireContactConstraint::calculateRHS(), agx::GlobalResult::Transaction::commit(), agxData::BufferT< T >::commit(), agxSDK::copyVectors(), agx::createMissingTiers(), agxCollide::Space::disableForContacts(), agxSDK::LinkedSegmentIterator< T >::end(), agx::ConstraintImplementation::findSecondaryConstraintGivenType(), agxSDK::MergeSplitThresholds::get(), agx::WireContactConstraint::getForceOnParticle(), agxSDK::MultiCollisionFilterContactHandler::getGeometryContact(), agxModel::HeightController::getHeight(), agx::WireContactConstraint::getInvMass(), agx::WireContactConstraint::getJacobian(), agx::WireContactConstraint::getMass(), agx::ConstraintImplementation::BodyView::getNumBodies(), agxSDK::LinkedStructure::getNumSegments(), agxIO::MeshReader::getNumTriangles(), agxSDK::MergeSplitThresholds::getNumValues(), agxSDK::LinkedStructure::getSegment(), agxSDK::CollisionGroupFilter::hasMemberGroup(), agxSDK::CollisionGroupFilter::match(), agx::Vector< T, Allocator >::operator!=(), agx::VectorPOD< T, Allocator >::operator!=(), agx::Vector< T, Allocator >::operator=(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::operator=(), agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::operator=(), agx::VectorPOD< T, Allocator >::operator=(), agx::Vector< T, Allocator >::operator==(), agx::VectorPOD< T, Allocator >::operator==(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::operator[](), agx::SetVector< const agxPowerLine::Unit * >::operator[](), agxOSG::RenderStateManager::parseUniform(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::purge(), agx::SetVector< const agxPowerLine::Unit * >::purge(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::push_back(), agx::SetVector< const agxPowerLine::Unit * >::push_back(), agxIO::ArgumentParser::read1(), agxIO::ArgumentParser::read2(), agxIO::ArgumentParser::read3(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::rebuild(), agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::rebuild(), agxRender::HeightFieldProxy::setHeights(), agxUtil::ConvexHull2D::size(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::size(), agx::SetVector< const agxPowerLine::Unit * >::size(), agxVehicle::utils::splitNonconsecutive(), agxWire::transformPointToShape(), agxWire::transformPointToWorld(), agxWire::transformVectorToShape(), agxWire::transformVectorToWorld(), agxModel::triangleIterator(), agx::Event::trigger(), and agxStream::StoreObjects< T >::~StoreObjects().
|
protectedinherited |
Definition at line 96 of file Container.h.
Referenced by agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::buckets(), agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::buckets(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::clear(), agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::clear(), agx::Container::Container(), agx::Container::ptr(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::rebuild(), agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::rebuild(), agx::Vector< T, Allocator >::swap(), agx::VectorPOD< T, Allocator >::swap(), agx::Container::~Container(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::~HashSetImplementation(), and agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::~QuadraticProbingHashTableImplementation().
|
protectedinherited |
Definition at line 95 of file Container.h.
Referenced by agx::Container::capacity(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::clear(), agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::clear(), agx::Container::Container(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::numBuckets(), agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::numBuckets(), agx::Vector< T, Allocator >::swap(), agx::VectorPOD< T, Allocator >::swap(), agx::Container::~Container(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::~HashSetImplementation(), and agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::~QuadraticProbingHashTableImplementation().
|
protectedinherited |
Definition at line 94 of file Container.h.
Referenced by agx::Container::Container(), agx::Container::empty(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::numFilled(), agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::numFilled(), agx::Container::size(), agx::Vector< T, Allocator >::swap(), agx::VectorPOD< T, Allocator >::swap(), and agx::Container::~Container().