Go to the documentation of this file. 1 #ifndef GfxTL__INDEXEDTREEDATAKERNELS_HEADER__
2 #define GfxTL__INDEXEDTREEDATAKERNELS_HEADER__
10 template<
class DataT,
class IndicesT >
37 m_indices.resize(m_data.size());
38 for (
size_t i = 0; i < m_indices.size(); ++i)
96 return m_data.begin();
106 return m_data.begin();
116 return m_indices.size();
131 Swap(
a, b, &m_indices);
136 m_indices.resize(m_indices.size() + 1);
137 typename IndicesT::value_type
v = m_data.size() - 1;
138 std::copy_backward(m_indices.begin() + h, m_indices.end() - 1, m_indices.end());
147 template<
class DataT,
class IndicesT >
166 m_indices.resize(m_data->size());
167 for (
size_t i = 0; i < m_indices.size(); ++i)
186 return Dereference(h);
191 return m_data->at(
s);
196 return m_data->back();
201 return IndexIterate(m_indices.begin(), m_data->begin());
211 return IndexIterate(m_indices.begin(), m_data->begin());
221 return m_data->begin();
226 return m_data->end();
231 return m_data->begin();
236 return m_data->end();
241 return m_indices.size();
256 Swap(
a, b, &m_indices);
261 m_indices.resize(m_indices.size() + 1);
262 typename IndicesT::value_type
v = m_data->size() - 1;
263 std::copy_backward(m_indices.begin() + h, m_indices.end() - 1, m_indices.end());
272 template<
class IteratorT,
class IndicesT >
276 typedef typename std::iterator_traits< IteratorT >::value_type
value_type;
293 m_indices.resize(m_end - m_begin);
294 for (
size_t i = 0; i < m_indices.size(); ++i)
313 return *(m_begin +
s);
323 return m_indices.size();
378 Swap(
a, b, &m_indices);
387 template<
class IndexIteratorT,
class DataIteratorT >
391 typedef typename std::iterator_traits< DataIteratorT >
394 typedef typename std::iterator_traits< IndexIteratorT >
403 IndexIteratorT endIndices, DataIteratorT beginData)
405 m_beginIndices = beginIndices;
406 m_endIndices = endIndices;
407 m_beginData = beginData;
411 IndexIteratorT endIndices)
413 m_beginIndices = beginIndices;
414 m_endIndices = endIndices;
419 return m_beginIndices[h];
429 return *(m_beginData +
s);
434 return *(m_beginData[*(m_endIndices - 1)]);
439 return m_endIndices - m_beginIndices;
469 return m_beginData +
size();
480 return m_beginData +
size();
495 std::swap(m_beginIndices[
a], m_beginIndices[b]);
499 IndexIteratorT m_beginIndices;
500 IndexIteratorT m_endIndices;
501 DataIteratorT m_beginData;
void IndexedData(IndexIteratorT beginIndices, IndexIteratorT endIndices, DataIteratorT beginData)
IndicesT::value_type DereferencedType
const DataT * IndexedData() const
dereferenced_iterator dereferenced_begin()
DereferencedType Dereference(HandleType h) const
const value_type & back() const
IndicesT::value_type DereferencedType
const value_type & back() const
const value_type & at(DereferencedType s) const
InvariantIdType InvariantId(HandleType h) const
const value_type & at(DereferencedType s) const
dereferenced_iterator dereferenced_end()
DataIteratorT const_dereferenced_iterator
dereferenced_iterator dereferenced_begin()
DataT::iterator dereferenced_iterator
DataT::const_iterator const_dereferenced_iterator
const_dereferenced_iterator dereferenced_end() const
const value_type & at(DereferencedType s) const
IndexedIterator< typename IndicesT::iterator, IteratorT > iterator
InvariantIdType InvariantId(HandleType h) const
IndicesT::size_type HandleType
IndicesT::size_type HandleType
const DataT & ContainedData() const
std::iterator_traits< DataIteratorT >::value_type value_type
void IndexedData(const DataT *data, bool initIndices=true)
void IndexedData(IteratorT begin, IteratorT end, bool initIndices=true)
dereferenced_iterator dereferenced_begin()
const_iterator begin() const
InvariantIdType InvariantId(HandleType h) const
const_iterator begin() const
DereferencedType InvariantIdType
const_dereferenced_iterator dereferenced_begin() const
void InsertBack(HandleType h)
InvariantIdType InvariantId(HandleType h) const
const_dereferenced_iterator dereferenced_begin() const
HandleType BeginHandle() const
void swap(SubscriptionHandle &first, SubscriptionHandle &second)
HandleType BeginHandle() const
double a(double t, double a0, double j)
IndexedIterator< typename IndicesT::const_iterator, IteratorT > const_iterator
DereferencedType Dereference(HandleType h) const
IndexedIterator< typename IndicesT::const_iterator, typename DataT::const_iterator > const_iterator
IndicesT::value_type DereferencedType
const_dereferenced_iterator dereferenced_end() const
const_dereferenced_iterator dereferenced_end() const
DataT::const_iterator dereferenced_iterator
DataT::value_type value_type
const_dereferenced_iterator dereferenced_begin() const
DataT::const_iterator const_dereferenced_iterator
const_dereferenced_iterator dereferenced_begin() const
std::iterator_traits< IndexIteratorT >::value_type DereferencedType
IndexedIterator< IndexIteratorT, IteratorT > IndexIterate(IndexIteratorT idxIt, IteratorT it)
IndexedIterator< IndexIteratorT, DataIteratorT > iterator
IteratorT const_dereferenced_iterator
void InsertBack(HandleType h)
DereferencedType Dereference(HandleType h) const
const_iterator begin() const
DataIteratorT dereferenced_iterator
std::iterator_traits< IteratorT >::value_type value_type
void SwapHandles(HandleType a, HandleType b)
dereferenced_iterator dereferenced_end()
const value_type & back() const
IteratorT dereferenced_iterator
const_iterator begin() const
const value_type & back() const
dereferenced_iterator dereferenced_end()
dereferenced_iterator dereferenced_begin()
double v(double t, double v0, double a0, double j)
HandleType EndHandle() const
void SwapHandles(HandleType a, HandleType b)
DereferencedType InvariantIdType
const_iterator end() const
const_iterator end() const
void IndexedRange(IndexIteratorT beginIndices, IndexIteratorT endIndices)
HandleType BeginHandle() const
HandleType EndHandle() const
DereferencedType Dereference(HandleType h) const
const_iterator end() const
IndexedIterator< typename IndicesT::const_iterator, typename DataT::const_iterator > const_iterator
IndexedIterator< typename IndicesT::iterator, typename DataT::iterator > iterator
HandleType EndHandle() const
IndexedIterator< IndexIteratorT, DataIteratorT > const_iterator
HandleType EndHandle() const
const_iterator end() const
const_dereferenced_iterator dereferenced_end() const
HandleType BeginHandle() const
IndicesT::size_type HandleType
void SwapHandles(HandleType a, HandleType b)
void SwapHandles(HandleType a, HandleType b)
dereferenced_iterator dereferenced_end()
DereferencedType InvariantIdType
const value_type & at(DereferencedType s) const
double s(double t, double s0, double v0, double a0, double j)
DereferencedType InvariantIdType
value_type & at(DereferencedType s)
void Swap(HandleT a, HandleT b, ContainerT *container)
DataT::value_type value_type