HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_RLEArray< T > Class Template Reference

#include <UT_RLEArray.h>

Classes

class  iterator
 
struct  Run
 

Public Types

using value_type = T
 
using const_iterator = iterator
 

Public Member Functions

 UT_RLEArray ()
 
 UT_RLEArray (const T *data, exint size)
 
 UT_RLEArray (const UT_Array< T > &arr)
 
 ~UT_RLEArray ()
 
SYS_FORCE_INLINE bool isEmpty () const
 
SYS_FORCE_INLINE exint size () const
 
SYS_FORCE_INLINE exint numRuns () const
 
SYS_FORCE_INLINE const Runrun (exint i) const
 
SYS_FORCE_INLINE void clear ()
 
SYS_FORCE_INLINE exint countSize () const
 
SYS_FORCE_INLINE exint getMemoryUsage () const
 
SYS_FORCE_INLINE bool isUniform () const
 
SYS_FORCE_INLINE const TuniformItem () const
 
SYS_FORCE_INLINE const TfindItem (exint idx) const
 Note that finding an item is O(log(N)) - where N is the number of runs. More...
 
SYS_FORCE_INLINE void appendRun (const T &item, exint n)
 
SYS_FORCE_INLINE void append (const T &item)
 
SYS_FORCE_INLINE iterator begin () const
 
SYS_FORCE_INLINE iterator end () const
 

Detailed Description

template<typename T>
class UT_RLEArray< T >

Appending elements to this array will build up a run-length encoded compressed array. Random access may not be fast.

Definition at line 25 of file UT_RLEArray.h.

Member Typedef Documentation

template<typename T>
using UT_RLEArray< T >::const_iterator = iterator

Definition at line 337 of file UT_RLEArray.h.

template<typename T>
using UT_RLEArray< T >::value_type = T

Definition at line 28 of file UT_RLEArray.h.

Constructor & Destructor Documentation

template<typename T>
UT_RLEArray< T >::UT_RLEArray ( )
inline

Definition at line 126 of file UT_RLEArray.h.

template<typename T>
UT_RLEArray< T >::UT_RLEArray ( const T data,
exint  size 
)
inline

Definition at line 131 of file UT_RLEArray.h.

template<typename T>
UT_RLEArray< T >::UT_RLEArray ( const UT_Array< T > &  arr)
inline

Definition at line 138 of file UT_RLEArray.h.

template<typename T>
UT_RLEArray< T >::~UT_RLEArray ( )
inline

Definition at line 145 of file UT_RLEArray.h.

Member Function Documentation

template<typename T>
SYS_FORCE_INLINE void UT_RLEArray< T >::append ( const T item)
inline

Definition at line 226 of file UT_RLEArray.h.

template<typename T>
SYS_FORCE_INLINE void UT_RLEArray< T >::appendRun ( const T item,
exint  n 
)
inline

Definition at line 203 of file UT_RLEArray.h.

template<typename T>
SYS_FORCE_INLINE iterator UT_RLEArray< T >::begin ( void  ) const
inline

Definition at line 339 of file UT_RLEArray.h.

template<typename T>
SYS_FORCE_INLINE void UT_RLEArray< T >::clear ( void  )
inline

Definition at line 153 of file UT_RLEArray.h.

template<typename T>
SYS_FORCE_INLINE exint UT_RLEArray< T >::countSize ( ) const
inline

This is a slow way of computing the size of the array but can be used for debugging.

Definition at line 161 of file UT_RLEArray.h.

template<typename T>
SYS_FORCE_INLINE iterator UT_RLEArray< T >::end ( void  ) const
inline

Definition at line 340 of file UT_RLEArray.h.

template<typename T>
SYS_FORCE_INLINE const T& UT_RLEArray< T >::findItem ( exint  idx) const
inline

Note that finding an item is O(log(N)) - where N is the number of runs.

Definition at line 188 of file UT_RLEArray.h.

template<typename T>
SYS_FORCE_INLINE exint UT_RLEArray< T >::getMemoryUsage ( ) const
inline

Definition at line 169 of file UT_RLEArray.h.

template<typename T>
SYS_FORCE_INLINE bool UT_RLEArray< T >::isEmpty ( ) const
inline

Definition at line 149 of file UT_RLEArray.h.

template<typename T>
SYS_FORCE_INLINE bool UT_RLEArray< T >::isUniform ( ) const
inline

Definition at line 178 of file UT_RLEArray.h.

template<typename T>
SYS_FORCE_INLINE exint UT_RLEArray< T >::numRuns ( ) const
inline

Definition at line 151 of file UT_RLEArray.h.

template<typename T>
SYS_FORCE_INLINE const Run& UT_RLEArray< T >::run ( exint  i) const
inline

Definition at line 152 of file UT_RLEArray.h.

template<typename T>
SYS_FORCE_INLINE exint UT_RLEArray< T >::size ( void  ) const
inline

Definition at line 150 of file UT_RLEArray.h.

template<typename T>
SYS_FORCE_INLINE const T& UT_RLEArray< T >::uniformItem ( ) const
inline

Definition at line 182 of file UT_RLEArray.h.


The documentation for this class was generated from the following file: