|
AGXDynamics
2.31.1.0
|
Essentially a sparse array of bounds. More...
#include <SparseTypes.h>
Inheritance diagram for agx::SparseRangeReal: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 const IndexedRangeReal * | const_iterator |
| typedef const IndexedRangeReal * | const_pointer |
| typedef const IndexedRangeReal & | const_reference |
| typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
| typedef ptrdiff_t | difference_type |
| typedef IndexedRangeReal * | iterator |
| typedef std::random_access_iterator_tag | iterator_category |
| typedef IndexedRangeReal * | pointer |
| typedef IndexedRangeReal & | reference |
| typedef std::reverse_iterator< iterator > | reverse_iterator |
| typedef size_t | size_type |
| typedef IndexedRangeReal | Type |
| typedef IndexedRangeReal | value_type |
Public Member Functions | |
| SparseRangeReal () | |
| Default constructor. More... | |
| agx::Bool | add (agx::NlmcpCallback *callback, agx::UInt localRow, agx::UInt numRows) |
| Add nl-callback to receive callbacks during solves. More... | |
| ByteAllocator & | allocator () |
| const ByteAllocator & | allocator () const |
| IndexedRangeReal & | at (size_t index) const |
| IndexedRangeReal & | back () const |
| iterator | begin () |
| const_iterator | begin () const |
| void | beginNlAddScope (agx::UInt permutedMatrixRow, agx::UInt iterativeRow) |
| Begin scope where NlmcpCallback instances are added given permuted matrix row. More... | |
| 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, optionally with maintained buffer allocation. More... | |
| bool | contains (const T2 &element) const |
| Test if the vector contains a certain element. More... | |
| bool | contains (const IndexedRangeReal &element) const |
| bool | empty () const |
| iterator | end () |
| const_iterator | end () const |
| agx::UInt | endNlAddScope () |
| End 'add new nl-callbacks' scope. More... | |
| iterator | erase (iterator position) |
| STL erase functionality. More... | |
| iterator | erase (iterator start, iterator end) |
| void | erase (size_t index) |
| Erase elements using indices instead of iterators. More... | |
| void | erase (size_t start, size_t end) |
| iterator | eraseFast (const_iterator position) |
| Fast erase, replacing the erased element with the last element. More... | |
| void | eraseFast (size_t index) |
| size_t | find (const T2 &element) const |
| Find the index to a matching element, return size() if not found. More... | |
| bool | findAndErase (const T2 &element, bool searchMultiple=false) |
| Find and erase an element. More... | |
| IndexedRangeReal & | front () const |
| const NlmcpCallbacks & | getCallbacks () const |
| agx::UInt | getScopeIterativeRow () const |
| agx::UInt | getScopePermutedMatrixRow () const |
| IndexedRangeReal * | increment (size_t numElements=1) |
| Resize using a increment. More... | |
| iterator | insert (iterator position, const IndexedRangeReal &value) |
| void | insert (size_t index, const IndexedRangeReal &value) |
| void | insert (const_iterator it, InputIterator first, InputIterator last) |
| void | insert (const_iterator it, std::initializer_list< IndexedRangeReal > ilist) |
| agx::Bool | isBoundedByNlCallback (agx::UInt row, agx::UInt searchDepth) const |
| int | load_hdf5 (void *group, const agx::String &name) |
| read the array from an hdf5 stream, here disguised as the void * pointer More... | |
| int | load_hdf5 (const agx::String &filename, const agx::String &name) |
| read the array to file in hdf5 format, with given name. More... | |
| bool | operator!= (const Vector< IndexedRangeReal, ByteAllocator > &other) const |
| bool | operator== (const Vector< IndexedRangeReal, ByteAllocator > &other) const |
| Compare with other vector, return true if same size and all pairs are equal. More... | |
| IndexedRangeReal & | operator[] (size_t i) const |
| void | pop_back () |
| IndexedRangeReal * | ptr () |
| Get access to the internal data buffer. More... | |
| const IndexedRangeReal * | ptr () const |
| void | push_back (const T2 &value) |
| void | push_back (const IndexedRangeReal &value) |
| void | push_back (IndexedRangeReal &&value) |
| reverse_iterator | rbegin () |
| const_reverse_iterator | rbegin () const |
| reverse_iterator | rend () |
| const_reverse_iterator | rend () const |
| void | reserve (size_t size) |
| Reserve capacity in the vector. More... | |
| void | reserveAtLeast (size_t size) |
| Reserve capacity in the vector. More... | |
| void | resize (size_t size) |
| Resize the vector, which then enables direct addressing using the bracket '[]' operator. More... | |
| void | resize (size_t size, const IndexedRangeReal &value) |
| int | save_hdf5 (void *group, const agx::String &name) const |
| write the array to an hdf5 stream, here disguised as the void * pointer More... | |
| int | save_hdf5 (const agx::String &filename, const agx::String &name) const |
| write the array to file in hdf5 format, with given name. More... | |
| void | shrink_to_fit () |
| Reduce the capacity of the vector to the actual size (number of elements) More... | |
| size_t | size () const |
| void | sort () |
| Sort given 'index' in IndexedRangeReal and updates indices of added nl-callbacks. More... | |
| void | swap (Vector &other) |
Protected Attributes | |
| void * | m_buffer |
| size_t | m_capacity |
| size_t | m_size |
Essentially a sparse array of bounds.
Definition at line 73 of file SparseTypes.h.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
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.
| agx::SparseRangeReal::SparseRangeReal | ( | ) |
Default constructor.
| agx::Bool agx::SparseRangeReal::add | ( | agx::NlmcpCallback * | callback, |
| agx::UInt | localRow, | ||
| agx::UInt | numRows | ||
| ) |
Add nl-callback to receive callbacks during solves.
| callback | - callback |
| localRow | - local start row of the non-linear bound |
| numRows | - number of rows the nl-callback handles |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Begin scope where NlmcpCallback instances are added given permuted matrix row.
When a new callback is added the local row is given which will be an offset of permutedMatrixRow.
|
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< WireContactConstraintRef >::operator=().
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 136 of file Container.h.
References agx::Container::m_size.
Referenced by agx::MemoryPoolOld< T >::clear(), agx::createMissingTiers(), agxCollide::Space::disableForContacts(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::empty(), agx::SetVector< agx::ref_ptr< agxSDK::EventListener > >::empty(), and agxSDK::LinkedSegmentIterator< T >::isEnd().
|
inherited |
|
inherited |
| agx::UInt agx::SparseRangeReal::endNlAddScope | ( | ) |
End 'add new nl-callbacks' scope.
It's not valid to add callbacks after calling this method.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| const NlmcpCallbacks& agx::SparseRangeReal::getCallbacks | ( | ) | const |
| agx::UInt agx::SparseRangeReal::getScopeIterativeRow | ( | ) | const |
| agx::UInt agx::SparseRangeReal::getScopePermutedMatrixRow | ( | ) | const |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| agx::Bool agx::SparseRangeReal::isBoundedByNlCallback | ( | agx::UInt | row, |
| agx::UInt | searchDepth | ||
| ) | const |
| row | - permuted matrix row |
| searchDepth | - number of callbacks to check from back of array |
| int agx::SparseRangeReal::load_hdf5 | ( | void * | group, |
| const agx::String & | name | ||
| ) |
read the array from an hdf5 stream, here disguised as the void * pointer
| int agx::SparseRangeReal::load_hdf5 | ( | const agx::String & | filename, |
| const agx::String & | name | ||
| ) |
read the array to file in hdf5 format, with given name.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Reserve capacity in the vector.
Let vector grow in same way as push_back() does.
|
inherited |
|
inherited |
| int agx::SparseRangeReal::save_hdf5 | ( | void * | group, |
| const agx::String & | name | ||
| ) | const |
write the array to an hdf5 stream, here disguised as the void * pointer
| int agx::SparseRangeReal::save_hdf5 | ( | const agx::String & | filename, |
| const agx::String & | name | ||
| ) | const |
write the array to file in hdf5 format, with given name.
|
inherited |
|
inherited |
Definition at line 134 of file Container.h.
References agx::Container::m_size.
Referenced by agxCollide::GroupFooCollider< ShapeType >::_calculateContacts(), agxData::Array< JacobianElementT >::Array(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::back(), agx::SetVector< agx::ref_ptr< agxSDK::EventListener > >::back(), agx::MemoryPoolOld< T >::clear(), agxData::BufferT< T >::commit(), agxSDK::copyVectors(), agx::createMissingTiers(), agxCollide::Space::disableForContacts(), agxSDK::LinkedSegmentIterator< T >::end(), agxSDK::LinkedSegmentIterator< T >::findPrevIndex(), agx::ConstraintImplementation::findSecondaryConstraintGivenType(), agx::MemoryPoolOld< T >::garbageCollect(), agx::ConstraintImplementation::BodyView::getNumBodies(), agx::ConstraintImplementation::SolverBodyView::getPermutedBodyAt(), agxSDK::LinkedSegmentIterator< T >::isEnd(), agxPowerLine::ConnectionIterator< T >::isValid(), agxPowerLine::PhysicalDimensionIterator< UnitPtr >::isValid(), agx::Vector< WireContactConstraintRef >::operator!=(), agx::VectorPOD< agx::Vec6 >::operator!=(), agxSDK::LinkedSegmentIterator< T >::operator+(), agxPowerLine::PhysicalDimensionIterator< UnitPtr >::operator++(), agxSDK::LinkedSegmentIterator< T >::operator-(), agx::Vector< WireContactConstraintRef >::operator=(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::operator=(), agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::operator=(), agx::VectorPOD< agx::Vec6 >::operator=(), agx::Vector< WireContactConstraintRef >::operator==(), agx::VectorPOD< agx::Vec6 >::operator==(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::operator[](), agx::SetVector< agx::ref_ptr< agxSDK::EventListener > >::operator[](), agxOSG::RenderStateManager::parseUniform(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::purge(), agx::SetVector< agx::ref_ptr< agxSDK::EventListener > >::purge(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::push_back(), agx::SetVector< agx::ref_ptr< agxSDK::EventListener > >::push_back(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::rebuild(), agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::rebuild(), agxRender::HeightFieldProxy::setHeights(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::size(), agx::SetVector< agx::ref_ptr< agxSDK::EventListener > >::size(), agxVehicle::utils::splitNonconsecutive(), agxWire::transformPointToShape(), agxWire::transformPointToWorld(), agxWire::transformVectorToShape(), agxWire::transformVectorToWorld(), agxModel::triangleIterator(), agx::Event::trigger(), and agxStream::StoreObjects< T >::~StoreObjects().
| void agx::SparseRangeReal::sort | ( | ) |
Sort given 'index' in IndexedRangeReal and updates indices of added nl-callbacks.
|
inherited |
|
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::Thread::log(), agx::Container::ptr(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::rebuild(), agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::rebuild(), agx::Vector< WireContactConstraintRef >::swap(), agx::VectorPOD< agx::Vec6 >::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< WireContactConstraintRef >::swap(), agx::VectorPOD< agx::Vec6 >::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< WireContactConstraintRef >::swap(), agx::VectorPOD< agx::Vec6 >::swap(), and agx::Container::~Container().