|
AGXDynamics
2.31.1.0
|
#include <Vector.h>
Inheritance diagram for agxData::Vector< T >:Public Types | |
| typedef const T * | const_iterator |
| typedef const T * | const_pointer |
| typedef const T & | const_reference |
| typedef ptrdiff_t | difference_type |
| typedef T * | iterator |
| typedef std::random_access_iterator_tag | iterator_category |
| typedef T * | pointer |
| typedef T & | reference |
| typedef size_t | size_type |
| typedef T | Type |
| typedef T | value_type |
Public Member Functions | |
| Vector () | |
| Vector (agxData::Buffer *buffer) | |
| ~Vector () | |
| void | _setBuffer (agxData::Buffer *buffer) |
| Set the buffer while maintaining the current range, should normally not be used. More... | |
| agx::GlobalResult::Transaction | allocateResult (size_t numElements) |
| const AbstractArray & | asArray () const |
| AbstractArray & | asArray () |
| template<typename T > | |
| Array< T > & | asArray () |
| template<typename T > | |
| const Array< T > & | asArray () const |
| const AbstractScalar & | asScalar () const |
| AbstractScalar & | asScalar () |
| template<typename T > | |
| Scalar< T > & | asScalar () |
| template<typename T > | |
| const Scalar< T > & | asScalar () const |
| T & | at (size_t index) |
| const T & | at (size_t index) const |
| T & | back () |
| const T & | back () const |
| iterator | begin () |
| const_iterator | begin () const |
| const agxData::Buffer * | buffer () const |
| agxData::Buffer * | buffer () |
| void | clear () |
| Remove all elements, optionally with maintained buffer allocation. More... | |
| void | commit () |
| Commit all changes. More... | |
| size_t | commitResult (size_t numElements, const void *localResult, agx::Index sortIndex) |
| size_t | commitResult (size_t numElements, const void *localResult) |
| template<typename T2 > | |
| size_t | commitResult (const T2 &vector, agx::Index sortIndex) |
| template<typename T2 > | |
| size_t | commitResult (const T2 &vector) |
| template<typename T2 > | |
| bool | contains (const T2 &element) const |
| void | decrement (size_t numElements=1) |
| bool | empty () const |
| iterator | end () |
| const_iterator | end () const |
| 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) |
| template<typename T2 > | |
| size_t | find (const T2 &element) const |
| The index of the first occurrence of an element that is equal to the given element. More... | |
| template<typename T2 > | |
| bool | findAndErase (const T2 &element, bool searchMultiple=false) |
| Find and erase an element. More... | |
| T & | front () |
| const T & | front () const |
| agxData::Format * | getFormat () |
| const agxData::Format * | getFormat () const |
| agx::GlobalResult * | getGlobalResult () |
| T * | increment (size_t numElements=1, const T &value=T()) |
| Resize using a increment. More... | |
| void | init (agxData::Buffer *buffer, agx::IndexRange32 range) |
| Set the buffer that the array will access, as well as the range of the buffer that is to be covered. More... | |
| void | init (agxData::Buffer *buffer) |
| Set the buffer that the array will access. The range is set to the entire buffer. More... | |
| void | init () |
| Set to empty array. More... | |
| iterator | insert (iterator position, const T &value) |
| void | insert (size_t index, const T &value) |
| template<typename InputIterator > | |
| void | insert (iterator it, InputIterator first, InputIterator last) |
| bool | isValid () const |
| T & | operator[] (size_t index) |
| const T & | operator[] (size_t index) const |
| agxData::Array< T > | operator[] (agx::IndexRange32 subRange) const |
| void | pop_back () |
| Remove the back element. More... | |
| T * | ptr () |
| const T * | ptr () const |
| template<typename T2 > | |
| void | push_back (const T2 &value) |
| Append a new data element to the vector. More... | |
| agx::IndexRange32 & | range () |
| const agx::IndexRange32 & | range () const |
| void | reserve (size_t size) |
| Reserve capacity in the vector. More... | |
| void | resize (size_t size, const T &value=T()) |
| Resize the vector, which then enables direct addressing using the bracket '[]' operator. More... | |
| void | setRange (size_t startIndex, size_t endIndex) |
| Set the range of the buffer that the array will cover. More... | |
| void | setRange (agx::IndexRange32 range) |
| Set the range of the buffer that the array will cover. More... | |
| size_t | size () const |
| agxData::Array< T > | slice (agx::IndexRange32 subRange) const |
| void | sync () |
| Updates the internal data access pointer. Called when the back end buffer is reallocated. More... | |
Static Public Member Functions | |
| static agxData::Array< T > | raw (T *buffer, agx::Index size) |
| Array creation helper method that creates an array covering the given memory area. More... | |
| static const agxData::Array< T > | raw (const T *buffer, agx::Index size) |
Static Public Attributes | |
| static const bool | IsScalar = false |
Protected Attributes | |
| agxData::Buffer * | m_buffer |
| void * | m_ptr |
| agx::IndexRange32 | m_range |
Definition at line 27 of file ata/Vector.h.
| typedef const T* agxData::Vector< T >::const_iterator |
Definition at line 38 of file ata/Vector.h.
| typedef const T* agxData::Vector< T >::const_pointer |
Definition at line 33 of file ata/Vector.h.
| typedef const T& agxData::Vector< T >::const_reference |
Definition at line 35 of file ata/Vector.h.
| typedef ptrdiff_t agxData::Vector< T >::difference_type |
Definition at line 40 of file ata/Vector.h.
| typedef T* agxData::Vector< T >::iterator |
Definition at line 37 of file ata/Vector.h.
| typedef std::random_access_iterator_tag agxData::Vector< T >::iterator_category |
Definition at line 39 of file ata/Vector.h.
| typedef T* agxData::Vector< T >::pointer |
Definition at line 32 of file ata/Vector.h.
| typedef T& agxData::Vector< T >::reference |
Definition at line 34 of file ata/Vector.h.
| typedef size_t agxData::Vector< T >::size_type |
Definition at line 36 of file ata/Vector.h.
| typedef T agxData::Vector< T >::Type |
Definition at line 30 of file ata/Vector.h.
| typedef T agxData::Vector< T >::value_type |
Definition at line 31 of file ata/Vector.h.
|
explicit |
Definition at line 130 of file ata/Vector.h.
|
explicit |
Definition at line 135 of file ata/Vector.h.
References agxVerify, and agxData::Buffer::getStorage().
| agxData::Vector< T >::~Vector | ( | ) |
Definition at line 141 of file ata/Vector.h.
|
inherited |
Set the buffer while maintaining the current range, should normally not be used.
Definition at line 679 of file Buffer.h.
References agxAssert, agxData::AbstractArray::buffer(), agxData::AbstractArray::m_buffer, and agxData::AbstractArray::sync().
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 860 of file Buffer.h.
References agxAssert, and agxVerifyN.
|
inherited |
|
inherited |
Definition at line 820 of file Buffer.h.
References agxAssert, and agxAssert1.
Referenced by agx::createCell().
|
inherited |
Definition at line 812 of file Buffer.h.
References agxAssert, and agxAssert1.
|
inherited |
|
inherited |
|
inherited |
Definition at line 720 of file Buffer.h.
References agxData::AbstractArray::m_buffer.
Referenced by agxData::AbstractArray::_setBuffer(), and agxData::AbstractArray::init().
|
inherited |
Definition at line 719 of file Buffer.h.
References agxData::AbstractArray::m_buffer.
| void agxData::Vector< T >::clear | ( | ) |
Remove all elements, optionally with maintained buffer allocation.
Definition at line 331 of file ata/Vector.h.
| void agxData::Vector< T >::commit | ( | ) |
|
inherited |
Definition at line 578 of file Buffer.h.
References agx::InvalidIndex.
|
inherited |
Definition at line 587 of file Buffer.h.
References agx::InvalidIndex.
|
inherited |
Definition at line 596 of file Buffer.h.
References agx::InvalidIndex.
|
inherited |
Definition at line 606 of file Buffer.h.
References agx::InvalidIndex.
|
inherited |
Definition at line 920 of file Buffer.h.
References agx::InvalidIndex.
| void agxData::Vector< T >::decrement | ( | size_t | numElements = 1 | ) |
Definition at line 217 of file ata/Vector.h.
References agxAssert.
|
inherited |
Definition at line 713 of file Buffer.h.
References agxData::AbstractArray::m_range, and agx::IndexRangeT< T >::size().
Referenced by agx::createCell().
|
inherited |
|
inherited |
| Vector< T >::iterator agxData::Vector< T >::erase | ( | iterator | position | ) |
STL erase functionality.
Definition at line 255 of file ata/Vector.h.
References agxAssert, and agx::begin().
| Vector< T >::iterator agxData::Vector< T >::erase | ( | iterator | start, |
| iterator | end | ||
| ) |
Definition at line 265 of file ata/Vector.h.
References agxAssert, and agx::begin().
| void agxData::Vector< T >::erase | ( | size_t | index | ) |
Erase elements using indices instead of iterators.
Definition at line 277 of file ata/Vector.h.
References agxAssert.
| void agxData::Vector< T >::erase | ( | size_t | start, |
| size_t | end | ||
| ) |
Definition at line 291 of file ata/Vector.h.
References agxAssert, agxAssert1, and m_size.
| Vector< T >::iterator agxData::Vector< T >::eraseFast | ( | const_iterator | position | ) |
Fast erase, replacing the erased element with the last element.
Definition at line 310 of file ata/Vector.h.
References agxAssert, and agx::begin().
| void agxData::Vector< T >::eraseFast | ( | size_t | index | ) |
Definition at line 320 of file ata/Vector.h.
References agxAssert, agxAssertN, and m_size.
|
inherited |
The index of the first occurrence of an element that is equal to the given element.
If there is no such element, then InvalidIndex is returned.
| element | The value to search for. |
Definition at line 908 of file Buffer.h.
References agx::InvalidIndex.
| bool agxData::Vector< T >::findAndErase | ( | const T2 & | element, |
| bool | searchMultiple = false |
||
| ) |
Find and erase an element.
| element | The element to search for |
| searchMultiple | Set to true if search should continue after element is found, otherwise the search terminates on first match. |
Definition at line 338 of file ata/Vector.h.
References agxAssert.
|
inherited |
Definition at line 836 of file Buffer.h.
References agxAssert, and agxAssert1.
|
inherited |
Definition at line 828 of file Buffer.h.
References agxAssert, and agxAssert1.
|
inherited |
Definition at line 726 of file Buffer.h.
References agxData::Buffer::getFormat(), and agxData::AbstractArray::m_buffer.
|
inherited |
Definition at line 727 of file Buffer.h.
References agxData::Buffer::getFormat(), and agxData::AbstractArray::m_buffer.
|
inherited |
| T * agxData::Vector< T >::increment | ( | size_t | numElements = 1, |
| const T & | value = T() |
||
| ) |
Resize using a increment.
Definition at line 198 of file ata/Vector.h.
References agxAssert, agxData::Buffer::CAPACITY_MULTIPLIER, and m_capacity.
|
inherited |
Set the buffer that the array will access, as well as the range of the buffer that is to be covered.
Definition at line 661 of file Buffer.h.
References agxAssert, agxData::AbstractArray::buffer(), agx::IndexRangeT< T >::end(), agxData::Buffer::getArray(), agxData::AbstractArray::m_buffer, agxData::AbstractArray::m_range, agx::max(), agxData::AbstractArray::range(), agxData::Buffer::size(), and agxData::AbstractArray::sync().
|
inherited |
Set the buffer that the array will access. The range is set to the entire buffer.
Definition at line 673 of file Buffer.h.
References agxAssert, agxData::AbstractArray::init(), and agxData::Buffer::size().
|
inherited |
Set to empty array.
Definition at line 654 of file Buffer.h.
References agxData::AbstractArray::m_buffer, agxData::Data::m_ptr, and agxData::AbstractArray::m_range.
Referenced by agxData::AbstractArray::AbstractArray(), and agxData::AbstractArray::init().
| Vector< T >::iterator agxData::Vector< T >::insert | ( | iterator | position, |
| const T & | value | ||
| ) |
Definition at line 362 of file ata/Vector.h.
References agxAssert, and agx::begin().
| void agxData::Vector< T >::insert | ( | size_t | index, |
| const T & | value | ||
| ) |
Definition at line 372 of file ata/Vector.h.
References agxAssert, agxAssertN, agxData::Buffer::CAPACITY_MULTIPLIER, m_capacity, and m_size.
| void agxData::Vector< T >::insert | ( | iterator | it, |
| InputIterator | first, | ||
| InputIterator | last | ||
| ) |
Definition at line 391 of file ata/Vector.h.
References agxAssert, agx::begin(), agxData::Buffer::CAPACITY_MULTIPLIER, m_capacity, and m_size.
|
inherited |
Definition at line 724 of file Buffer.h.
References agxData::AbstractArray::m_buffer.
|
inherited |
Definition at line 845 of file Buffer.h.
References agxAssert1, and agxAssertN.
|
inherited |
|
inherited |
| void agxData::Vector< T >::pop_back | ( | ) |
|
inherited |
Definition at line 900 of file Buffer.h.
Referenced by agx::JacobianAccessorT< T >::setup().
|
inherited |
| void agxData::Vector< T >::push_back | ( | const T2 & | value | ) |
Append a new data element to the vector.
Definition at line 231 of file ata/Vector.h.
References agxAssert, agxData::Buffer::CAPACITY_MULTIPLIER, m_capacity, and m_size.
|
inherited |
Definition at line 721 of file Buffer.h.
References agxData::AbstractArray::m_range.
Referenced by agxData::AbstractArray::AbstractArray(), agx::createCell(), agxData::AbstractArray::init(), and agxData::AbstractArray::setRange().
|
inherited |
Definition at line 722 of file Buffer.h.
References agxData::AbstractArray::m_range.
|
staticinherited |
Array creation helper method that creates an array covering the given memory area.
The created array will not have a back end Buffer object and is therefore invalid. The given memory area will be interpreted as an array of elements of type T.
| buffer | Memory area that the array should index into. |
| size | The length, in number of elements, that the array should cover. |
Definition at line 733 of file Buffer.h.
References agxData::Data::m_ptr, and agxData::AbstractArray::m_range.
|
staticinherited |
Definition at line 744 of file Buffer.h.
References agxData::Data::m_ptr, and agxData::AbstractArray::m_range.
| void agxData::Vector< T >::reserve | ( | size_t | size | ) |
| void agxData::Vector< T >::resize | ( | size_t | size, |
| const T & | value = T() |
||
| ) |
Resize the vector, which then enables direct addressing using the bracket '[]' operator.
Definition at line 165 of file ata/Vector.h.
References AGX_VECTOR_SHRINK_THRESHOLD, agxAssert, m_capacity, and m_size.
|
inherited |
|
inherited |
Set the range of the buffer that the array will cover.
Definition at line 687 of file Buffer.h.
References agxAssert, agx::IndexRangeT< T >::end(), agxData::Buffer::getArray(), agxData::AbstractArray::m_buffer, agxData::AbstractArray::m_range, agx::max(), agxData::AbstractArray::range(), agxData::Buffer::size(), and agxData::AbstractArray::sync().
|
inherited |
Definition at line 708 of file Buffer.h.
References agxData::AbstractArray::m_range, and agx::IndexRangeT< T >::size().
Referenced by agx::calculateTier(), agx::GlobalResult::commit(), agx::createCell(), agx::IndexListRange< T >::IndexListRange(), and agx::JacobianAccessorT< T >::setup().
|
inherited |
Definition at line 875 of file Buffer.h.
References agx::IndexRangeT< T >::begin(), and agx::IndexRangeT< T >::end().
|
inherited |
Updates the internal data access pointer. Called when the back end buffer is reallocated.
Definition at line 702 of file Buffer.h.
References agxAssert, agx::IndexRangeT< T >::begin(), agxData::Buffer::getFormat(), agxData::Format::getSize(), agxData::AbstractArray::m_buffer, agxData::Data::m_ptr, agxData::AbstractArray::m_range, and agxData::Buffer::ptr().
Referenced by agxData::AbstractArray::_setBuffer(), agxData::AbstractArray::init(), and agxData::AbstractArray::setRange().
|
staticinherited |
|
protectedinherited |
Definition at line 96 of file Array.h.
Referenced by agxData::AbstractArray::_setBuffer(), agxData::AbstractArray::AbstractArray(), agxData::AbstractArray::buffer(), agxData::AbstractArray::getFormat(), agxData::AbstractArray::init(), agxData::AbstractArray::isValid(), agxData::AbstractArray::setRange(), and agxData::AbstractArray::sync().
|
protectedinherited |
Definition at line 72 of file Data.h.
Referenced by agxData::AbstractScalar::get(), agxData::AbstractArray::init(), agxData::Scalar< T >::operator=(), agxData::Data::ptr(), agxData::Array< T >::raw(), agxData::AbstractScalar::setStorage(), and agxData::AbstractArray::sync().
|
protectedinherited |
Definition at line 97 of file Array.h.
Referenced by agxData::AbstractArray::AbstractArray(), agxData::AbstractArray::empty(), agxData::AbstractArray::init(), agxData::AbstractArray::range(), agxData::Array< T >::raw(), agxData::AbstractArray::setRange(), agxData::AbstractArray::size(), and agxData::AbstractArray::sync().