Vowpal Wabbit
Public Types | Public Member Functions | List of all members
v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type > Struct Template Reference

#include <v_array.h>

Public Types

using value_type = T
 
using reference = value_type &
 
using const_reference = const value_type &
 
using pointer = value_type *
 
using const_pointer = const value_type *
 
using iterator = value_type *
 
using const_iterator = const value_type *
 

Public Member Functions

pointer data () noexcept
 
const_pointer data () const noexcept
 
iterator begin () noexcept
 
iterator end () noexcept
 
const_iterator begin () const noexcept
 
const_iterator end () const noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
 v_array () noexcept
 
 ~v_array ()
 
 v_array (v_array< T > &&other) noexcept
 
v_array< T > & operator= (v_array< T > &&other) noexcept
 
 v_array (const v_array< T > &other)
 
v_array< T > & operator= (const v_array< T > &other)
 
T & back ()
 
const T & back () const
 
void pop_back ()
 
 VW_DEPRECATED ("v_array::pop() is deprecated. Use pop_back(). This will be removed in VW 9.0.") T pop()
 
 VW_DEPRECATED ("v_array::last() is deprecated. Use back(). This will be removed in VW 9.0.") T last() const
 
bool empty () const
 
 VW_DEPRECATED ("v_array::decr() is deprecated. Use pop_back(). This will be removed in VW 9.0.") void decr()
 
 VW_DEPRECATED ("v_array::incr() is deprecated. Use push_back(). This will be removed in VW 9.0.") void incr()
 
T & operator[] (size_t i) const
 
size_t size () const
 
size_t capacity () const
 
 VW_DEPRECATED ("v_array::resize() is deprecated. Use reserve() instead. For standard resize behavior, use ""resize_but_with_stl_behavior(). This will be removed in VW 9.0.") void resize(size_t length)
 
void resize_but_with_stl_behavior (size_t length)
 
void shrink_to_fit ()
 
void reserve (size_t length)
 
void clear_noshrink ()
 
void clear ()
 
iterator erase (iterator it)
 Erase item at the given iterator. More...
 
iterator erase (iterator first, iterator last)
 Erase items from first to end. [first, end) More...
 
iterator insert (iterator it, const T &elem)
 Insert item into v_array directly after position. More...
 
iterator insert (iterator it, T &&elem)
 Insert item into v_array directly after position. More...
 
template<class InputIt >
void insert (iterator it, InputIt first, InputIt last)
 
void delete_v ()
 
void push_back (const T &new_ele)
 
void push_back_unchecked (const T &new_ele)
 
template<class... Args>
void emplace_back (Args &&...args)
 
size_t find_sorted (const T &ele) const
 
size_t unique_add_sorted (const T &new_ele)
 
bool contain_sorted (const T &ele, size_t &index)
 

Member Typedef Documentation

template<class T >
using v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::const_iterator = const value_type*
template<class T >
using v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::const_pointer = const value_type*
template<class T >
using v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::const_reference = const value_type&
template<class T >
using v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::iterator = value_type*
template<class T >
using v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::pointer = value_type*
template<class T >
using v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::reference = value_type&
template<class T >
using v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::value_type = T

Constructor & Destructor Documentation

template<class T >
v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::v_array ( )
inlinenoexcept
template<class T >
v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::~v_array ( )
inline
template<class T >
v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::v_array ( v_array< T > &&  other)
inlinenoexcept
template<class T >
v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::v_array ( const v_array< T > &  other)
inline

Member Function Documentation

template<class T >
T& v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::back ( )
inline
template<class T >
const T& v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::back ( ) const
inline
template<class T >
iterator v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::begin ( )
inlinenoexcept
template<class T >
const_iterator v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::begin ( ) const
inlinenoexcept
template<class T >
size_t v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::capacity ( ) const
inline
template<class T >
const_iterator v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::cbegin ( ) const
inlinenoexcept
template<class T >
const_iterator v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::cend ( ) const
inlinenoexcept
template<class T >
void v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::clear ( )
inline
template<class T >
void v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::clear_noshrink ( )
inline
template<class T >
bool v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::contain_sorted ( const T &  ele,
size_t &  index 
)
inline
template<class T >
pointer v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::data ( )
inlinenoexcept
template<class T >
const_pointer v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::data ( ) const
inlinenoexcept
template<class T >
void v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::delete_v ( )
inline
template<class T >
template<class... Args>
void v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::emplace_back ( Args &&...  args)
inline
template<class T >
bool v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::empty ( ) const
inline
template<class T >
iterator v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::end ( )
inlinenoexcept
template<class T >
const_iterator v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::end ( ) const
inlinenoexcept
template<class T >
iterator v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::erase ( iterator  it)
inline

Erase item at the given iterator.

Parameters
itIterator to erase at. UB if it is nullptr or out of bounds of the v_array
Returns
Iterator to item immediately following the erased element. May be equal to end()
Note
Invalidates iterators
template<class T >
iterator v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::erase ( iterator  first,
iterator  last 
)
inline

Erase items from first to end. [first, end)

Parameters
firstIterator to begin erasing at. UB if it is nullptr or out of bounds of the v_array
lastIterator to end erasing at. UB if it is nullptr or out of bounds of the v_array
Returns
Iterator to item immediately following the erased elements. May be equal to end()
Note
Invalidates iterators
template<class T >
size_t v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::find_sorted ( const T &  ele) const
inline
template<class T >
iterator v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::insert ( iterator  it,
const T &  elem 
)
inline

Insert item into v_array directly after position.

Parameters
firstIterator to insert at. May be end(). UB if outside bounds.
elemElement to insert
Returns
Iterator to inserted item.
Note
Invalidates iterators
template<class T >
iterator v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::insert ( iterator  it,
T &&  elem 
)
inline

Insert item into v_array directly after position.

Parameters
firstIterator to insert at. May be end(). UB if outside bounds.
elemElement to insert
Returns
Iterator to inserted item.
Note
Invalidates iterators
template<class T >
template<class InputIt >
void v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::insert ( iterator  it,
InputIt  first,
InputIt  last 
)
inline
template<class T >
v_array<T>& v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::operator= ( v_array< T > &&  other)
inlinenoexcept
template<class T >
v_array<T>& v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::operator= ( const v_array< T > &  other)
inline
template<class T >
T& v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::operator[] ( size_t  i) const
inline
template<class T >
void v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::pop_back ( )
inline
template<class T >
void v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::push_back ( const T &  new_ele)
inline
template<class T >
void v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::push_back_unchecked ( const T &  new_ele)
inline
template<class T >
void v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::reserve ( size_t  length)
inline
template<class T >
void v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::resize_but_with_stl_behavior ( size_t  length)
inline
template<class T >
void v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::shrink_to_fit ( )
inline
template<class T >
size_t v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::size ( ) const
inline
template<class T >
size_t v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::unique_add_sorted ( const T &  new_ele)
inline
template<class T >
v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::VW_DEPRECATED ( "v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::pop() is deprecated. Use pop_back(). This will be removed in VW 9.0."  )
inline
template<class T >
v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::VW_DEPRECATED ( "v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::last() is deprecated. Use back(). This will be removed in VW 9.0."  ) const
inline
template<class T >
v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::VW_DEPRECATED ( "v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::decr() is deprecated. Use pop_back(). This will be removed in VW 9.0."  )
inline
template<class T >
v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::VW_DEPRECATED ( "v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::incr() is deprecated. Use push_back(). This will be removed in VW 9.0."  )
inline
template<class T >
v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::VW_DEPRECATED ( "v_array< T, typename std::enable_if< std::is_trivially_copyable< T >::value >::type >::resize() is deprecated. Use reserve() instead. For standard resize  behavior,
use" "resize_but_with_stl_behavior().This will be removed in VW 9.0."   
)
inline

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