Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
util_intops::StrongVector< IntType, NativeType, Alloc > Class Template Reference

Detailed Description

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
class util_intops::StrongVector< IntType, NativeType, Alloc >

Definition at line 75 of file strong_vector.h.

#include <strong_vector.h>

Inheritance diagram for util_intops::StrongVector< IntType, NativeType, Alloc >:
operations_research::glop::StrictITIVector< ColIndex, Fractional > operations_research::glop::StrictITIVector< ColIndex, bool > operations_research::glop::StrictITIVector< ColIndex, ColIndex > operations_research::glop::StrictITIVector< ColIndex, RowIndex > operations_research::glop::StrictITIVector< ColIndex, VariableType > operations_research::glop::StrictITIVector< ColIndex, VariableStatus > operations_research::glop::StrictITIVector< RowIndex, Fractional > operations_research::glop::StrictITIVector< RowIndex, bool > operations_research::glop::StrictITIVector< RowIndex, RowIndex > operations_research::glop::StrictITIVector< RowIndex, ColIndex > operations_research::glop::StrictITIVector< RowIndex, ConstraintStatus > operations_research::glop::StrictITIVector< Index, Fractional > operations_research::glop::StrictITIVector< IndexType, ValueType > operations_research::glop::StrictITIVector< ColIndex, int32_t > operations_research::glop::StrictITIVector< EntryIndex, Fractional > operations_research::glop::StrictITIVector< EntryIndex, RowIndex > operations_research::glop::StrictITIVector< ColIndex, EntryIndex > operations_research::glop::StrictITIVector< RowIndex, std::string > operations_research::glop::StrictITIVector< ColIndex, std::string > operations_research::glop::StrictITIVector< RowIndex, int32_t > operations_research::glop::StrictITIVector< ColIndex, operations_research::glop::SparseColumn const * > operations_research::glop::StrictITIVector< IndexType, IndexType > operations_research::glop::StrictITIVector< ColIndex, operations_research::glop::SparseColumn > operations_research::glop::StrictITIVector< IntType, T, Alloc >

Public Types

typedef std::vector< NativeType, Alloc > ParentType
typedef ParentType::size_type size_type
typedef ParentType::allocator_type allocator_type
typedef ParentType::value_type value_type
typedef ParentType::reference reference
typedef ParentType::const_reference const_reference
typedef ParentType::pointer pointer
typedef ParentType::const_pointer const_pointer
typedef ParentType::iterator iterator
typedef ParentType::const_iterator const_iterator
typedef ParentType::reverse_iterator reverse_iterator
typedef ParentType::const_reverse_iterator const_reverse_iterator

Public Member Functions

 StrongVector ()
 StrongVector (const allocator_type &a)
 StrongVector (size_type n)
 StrongVector (IntType n)
 StrongVector (size_type n, const value_type &v, const allocator_type &a=allocator_type())
 StrongVector (IntType n, const value_type &v, const allocator_type &a=allocator_type())
 StrongVector (const StrongVector &x)
 StrongVector (StrongVector &&x)=default
 StrongVector (std::initializer_list< value_type > l, const allocator_type &a=allocator_type())
template<typename InputIteratorType>
 StrongVector (InputIteratorType first, InputIteratorType last, const allocator_type &a=allocator_type())
 ~StrongVector ()
const ParentTypeget () const
ParentTypemutable_get ()
reference operator[] (IntType i)
const_reference operator[] (IntType i) const
reference at (IntType i)
const_reference at (IntType i) const
IntType start_index () const
IntType end_index () const
bool IsValidSize () const
StrongIntRange< IntType > index_range () const
value_typedata ()
const value_typedata () const
StrongVectoroperator= (const StrongVector &x)
StrongVectoroperator= (StrongVector &&x)=default
StrongVectoroperator= (std::initializer_list< value_type > l)
void swap (StrongVector &x) noexcept
void assign (size_type n, const value_type &val)
template<typename InputIt>
void assign (InputIt f, InputIt l)
void assign (std::initializer_list< value_type > l)
template<typename... Args>
iterator emplace (const_iterator pos, Args &&... args)
template<typename... Args>
reference emplace_back (Args &&... args)
iterator insert (const_iterator pos, const value_type &x)
iterator insert (const_iterator pos, value_type &&x)
void insert (const_iterator pos, size_type n, const value_type &x)
template<typename SIT>
void insert (const_iterator pos, SIT first, SIT last)
void push_back (const value_type &val)
void push_back (value_type &&val)
void reserve (size_type n)
void reserve (IntType n)
void resize (size_type new_size)
void resize (IntType new_size)
void resize (size_type new_size, const value_type &x)
void resize (IntType new_size, const value_type &x)

Friends

template<typename H>
AbslHashValue (H h, const StrongVector &v)
bool operator== (const StrongVector &x, const StrongVector &y)
bool operator!= (const StrongVector &x, const StrongVector &y)
bool operator< (const StrongVector &x, const StrongVector &y)
bool operator> (const StrongVector &x, const StrongVector &y)
bool operator<= (const StrongVector &x, const StrongVector &y)
bool operator>= (const StrongVector &x, const StrongVector &y)
void swap (StrongVector &x, StrongVector &y) noexcept

Member Typedef Documentation

◆ allocator_type

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
typedef ParentType::allocator_type util_intops::StrongVector< IntType, NativeType, Alloc >::allocator_type

Definition at line 79 of file strong_vector.h.

◆ const_iterator

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
typedef ParentType::const_iterator util_intops::StrongVector< IntType, NativeType, Alloc >::const_iterator

Definition at line 86 of file strong_vector.h.

◆ const_pointer

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
typedef ParentType::const_pointer util_intops::StrongVector< IntType, NativeType, Alloc >::const_pointer

Definition at line 84 of file strong_vector.h.

◆ const_reference

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
typedef ParentType::const_reference util_intops::StrongVector< IntType, NativeType, Alloc >::const_reference

Definition at line 82 of file strong_vector.h.

◆ const_reverse_iterator

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
typedef ParentType::const_reverse_iterator util_intops::StrongVector< IntType, NativeType, Alloc >::const_reverse_iterator

Definition at line 88 of file strong_vector.h.

◆ iterator

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
typedef ParentType::iterator util_intops::StrongVector< IntType, NativeType, Alloc >::iterator

Definition at line 85 of file strong_vector.h.

◆ ParentType

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
typedef std::vector<NativeType, Alloc> util_intops::StrongVector< IntType, NativeType, Alloc >::ParentType

Definition at line 77 of file strong_vector.h.

◆ pointer

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
typedef ParentType::pointer util_intops::StrongVector< IntType, NativeType, Alloc >::pointer

Definition at line 83 of file strong_vector.h.

◆ reference

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
typedef ParentType::reference util_intops::StrongVector< IntType, NativeType, Alloc >::reference

Definition at line 81 of file strong_vector.h.

◆ reverse_iterator

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
typedef ParentType::reverse_iterator util_intops::StrongVector< IntType, NativeType, Alloc >::reverse_iterator

Definition at line 87 of file strong_vector.h.

◆ size_type

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
typedef ParentType::size_type util_intops::StrongVector< IntType, NativeType, Alloc >::size_type

Definition at line 78 of file strong_vector.h.

◆ value_type

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
typedef ParentType::value_type util_intops::StrongVector< IntType, NativeType, Alloc >::value_type

Definition at line 80 of file strong_vector.h.

Constructor & Destructor Documentation

◆ StrongVector() [1/10]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
util_intops::StrongVector< IntType, NativeType, Alloc >::StrongVector ( )
inline

Definition at line 91 of file strong_vector.h.

◆ StrongVector() [2/10]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
util_intops::StrongVector< IntType, NativeType, Alloc >::StrongVector ( const allocator_type & a)
inlineexplicit

Definition at line 92 of file strong_vector.h.

◆ StrongVector() [3/10]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
util_intops::StrongVector< IntType, NativeType, Alloc >::StrongVector ( size_type n)
inlineexplicit

Definition at line 93 of file strong_vector.h.

◆ StrongVector() [4/10]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
util_intops::StrongVector< IntType, NativeType, Alloc >::StrongVector ( IntType n)
inlineexplicit

Definition at line 94 of file strong_vector.h.

◆ StrongVector() [5/10]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
util_intops::StrongVector< IntType, NativeType, Alloc >::StrongVector ( size_type n,
const value_type & v,
const allocator_type & a = allocator_type() )
inlineexplicit

Definition at line 96 of file strong_vector.h.

◆ StrongVector() [6/10]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
util_intops::StrongVector< IntType, NativeType, Alloc >::StrongVector ( IntType n,
const value_type & v,
const allocator_type & a = allocator_type() )
inlineexplicit

Definition at line 101 of file strong_vector.h.

◆ StrongVector() [7/10]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
util_intops::StrongVector< IntType, NativeType, Alloc >::StrongVector ( const StrongVector< IntType, NativeType, Alloc > & x)
inline

Definition at line 104 of file strong_vector.h.

◆ StrongVector() [8/10]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
util_intops::StrongVector< IntType, NativeType, Alloc >::StrongVector ( StrongVector< IntType, NativeType, Alloc > && x)
default

◆ StrongVector() [9/10]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
util_intops::StrongVector< IntType, NativeType, Alloc >::StrongVector ( std::initializer_list< value_type > l,
const allocator_type & a = allocator_type() )
inline

Definition at line 108 of file strong_vector.h.

◆ StrongVector() [10/10]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
template<typename InputIteratorType>
util_intops::StrongVector< IntType, NativeType, Alloc >::StrongVector ( InputIteratorType first,
InputIteratorType last,
const allocator_type & a = allocator_type() )
inline

Definition at line 114 of file strong_vector.h.

◆ ~StrongVector()

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
util_intops::StrongVector< IntType, NativeType, Alloc >::~StrongVector ( )
inline

Definition at line 119 of file strong_vector.h.

Member Function Documentation

◆ assign() [1/3]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
template<typename InputIt>
void util_intops::StrongVector< IntType, NativeType, Alloc >::assign ( InputIt f,
InputIt l )
inline

Definition at line 220 of file strong_vector.h.

◆ assign() [2/3]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
void util_intops::StrongVector< IntType, NativeType, Alloc >::assign ( size_type n,
const value_type & val )
inline

Definition at line 215 of file strong_vector.h.

◆ assign() [3/3]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
void util_intops::StrongVector< IntType, NativeType, Alloc >::assign ( std::initializer_list< value_type > l)
inline

Definition at line 224 of file strong_vector.h.

◆ at() [1/2]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
reference util_intops::StrongVector< IntType, NativeType, Alloc >::at ( IntType i)
inline

Definition at line 139 of file strong_vector.h.

◆ at() [2/2]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
const_reference util_intops::StrongVector< IntType, NativeType, Alloc >::at ( IntType i) const
inline

Definition at line 142 of file strong_vector.h.

◆ data() [1/2]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
value_type * util_intops::StrongVector< IntType, NativeType, Alloc >::data ( )
inline

Definition at line 199 of file strong_vector.h.

◆ data() [2/2]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
const value_type * util_intops::StrongVector< IntType, NativeType, Alloc >::data ( ) const
inline

Definition at line 200 of file strong_vector.h.

◆ emplace()

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
template<typename... Args>
iterator util_intops::StrongVector< IntType, NativeType, Alloc >::emplace ( const_iterator pos,
Args &&... args )
inline

Definition at line 230 of file strong_vector.h.

◆ emplace_back()

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
template<typename... Args>
reference util_intops::StrongVector< IntType, NativeType, Alloc >::emplace_back ( Args &&... args)
inline

Definition at line 237 of file strong_vector.h.

◆ end_index()

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
IntType util_intops::StrongVector< IntType, NativeType, Alloc >::end_index ( ) const
inline

Definition at line 156 of file strong_vector.h.

◆ get()

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
const ParentType & util_intops::StrongVector< IntType, NativeType, Alloc >::get ( ) const
inline

Definition at line 123 of file strong_vector.h.

◆ index_range()

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
StrongIntRange< IntType > util_intops::StrongVector< IntType, NativeType, Alloc >::index_range ( ) const
inline

Definition at line 190 of file strong_vector.h.

◆ insert() [1/4]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
iterator util_intops::StrongVector< IntType, NativeType, Alloc >::insert ( const_iterator pos,
const value_type & x )
inline

Definition at line 243 of file strong_vector.h.

◆ insert() [2/4]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
template<typename SIT>
void util_intops::StrongVector< IntType, NativeType, Alloc >::insert ( const_iterator pos,
SIT first,
SIT last )
inline

Definition at line 258 of file strong_vector.h.

◆ insert() [3/4]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
void util_intops::StrongVector< IntType, NativeType, Alloc >::insert ( const_iterator pos,
size_type n,
const value_type & x )
inline

Definition at line 253 of file strong_vector.h.

◆ insert() [4/4]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
iterator util_intops::StrongVector< IntType, NativeType, Alloc >::insert ( const_iterator pos,
value_type && x )
inline

Definition at line 248 of file strong_vector.h.

◆ IsValidSize()

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
bool util_intops::StrongVector< IntType, NativeType, Alloc >::IsValidSize ( ) const
inline

Definition at line 162 of file strong_vector.h.

◆ mutable_get()

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
ParentType * util_intops::StrongVector< IntType, NativeType, Alloc >::mutable_get ( )
inline

Definition at line 130 of file strong_vector.h.

◆ operator=() [1/3]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
StrongVector & util_intops::StrongVector< IntType, NativeType, Alloc >::operator= ( const StrongVector< IntType, NativeType, Alloc > & x)
inline

Definition at line 202 of file strong_vector.h.

◆ operator=() [2/3]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
StrongVector & util_intops::StrongVector< IntType, NativeType, Alloc >::operator= ( std::initializer_list< value_type > l)
inline

Definition at line 207 of file strong_vector.h.

◆ operator=() [3/3]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
StrongVector & util_intops::StrongVector< IntType, NativeType, Alloc >::operator= ( StrongVector< IntType, NativeType, Alloc > && x)
default

◆ operator[]() [1/2]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
reference util_intops::StrongVector< IntType, NativeType, Alloc >::operator[] ( IntType i)
inline

Definition at line 133 of file strong_vector.h.

◆ operator[]() [2/2]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
const_reference util_intops::StrongVector< IntType, NativeType, Alloc >::operator[] ( IntType i) const
inline

Definition at line 136 of file strong_vector.h.

◆ push_back() [1/2]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
void util_intops::StrongVector< IntType, NativeType, Alloc >::push_back ( const value_type & val)
inline

Definition at line 263 of file strong_vector.h.

◆ push_back() [2/2]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
void util_intops::StrongVector< IntType, NativeType, Alloc >::push_back ( value_type && val)
inline

Definition at line 267 of file strong_vector.h.

◆ reserve() [1/2]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
void util_intops::StrongVector< IntType, NativeType, Alloc >::reserve ( IntType n)
inline

Definition at line 277 of file strong_vector.h.

◆ reserve() [2/2]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
void util_intops::StrongVector< IntType, NativeType, Alloc >::reserve ( size_type n)
inline

Definition at line 272 of file strong_vector.h.

◆ resize() [1/4]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
void util_intops::StrongVector< IntType, NativeType, Alloc >::resize ( IntType new_size)
inline

Definition at line 284 of file strong_vector.h.

◆ resize() [2/4]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
void util_intops::StrongVector< IntType, NativeType, Alloc >::resize ( IntType new_size,
const value_type & x )
inline

Definition at line 293 of file strong_vector.h.

◆ resize() [3/4]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
void util_intops::StrongVector< IntType, NativeType, Alloc >::resize ( size_type new_size)
inline

Definition at line 279 of file strong_vector.h.

◆ resize() [4/4]

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
void util_intops::StrongVector< IntType, NativeType, Alloc >::resize ( size_type new_size,
const value_type & x )
inline

Definition at line 288 of file strong_vector.h.

◆ start_index()

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
IntType util_intops::StrongVector< IntType, NativeType, Alloc >::start_index ( ) const
inline

Definition at line 151 of file strong_vector.h.

◆ swap()

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
void util_intops::StrongVector< IntType, NativeType, Alloc >::swap ( StrongVector< IntType, NativeType, Alloc > & x)
inlinenoexcept

Definition at line 213 of file strong_vector.h.

◆ AbslHashValue

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
template<typename H>
H AbslHashValue ( H h,
const StrongVector< IntType, NativeType, Alloc > & v )
friend

Definition at line 303 of file strong_vector.h.

◆ operator!=

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
bool operator!= ( const StrongVector< IntType, NativeType, Alloc > & x,
const StrongVector< IntType, NativeType, Alloc > & y )
friend

Definition at line 316 of file strong_vector.h.

◆ operator<

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
bool operator< ( const StrongVector< IntType, NativeType, Alloc > & x,
const StrongVector< IntType, NativeType, Alloc > & y )
friend

Definition at line 319 of file strong_vector.h.

◆ operator<=

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
bool operator<= ( const StrongVector< IntType, NativeType, Alloc > & x,
const StrongVector< IntType, NativeType, Alloc > & y )
friend

Definition at line 325 of file strong_vector.h.

◆ operator==

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
bool operator== ( const StrongVector< IntType, NativeType, Alloc > & x,
const StrongVector< IntType, NativeType, Alloc > & y )
friend

Definition at line 313 of file strong_vector.h.

◆ operator>

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
bool operator> ( const StrongVector< IntType, NativeType, Alloc > & x,
const StrongVector< IntType, NativeType, Alloc > & y )
friend

Definition at line 322 of file strong_vector.h.

◆ operator>=

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
bool operator>= ( const StrongVector< IntType, NativeType, Alloc > & x,
const StrongVector< IntType, NativeType, Alloc > & y )
friend

Definition at line 328 of file strong_vector.h.

◆ swap

template<typename IntType, typename NativeType, typename Alloc = std::allocator<NativeType>>
void swap ( StrongVector< IntType, NativeType, Alloc > & x,
StrongVector< IntType, NativeType, Alloc > & y )
friend

Definition at line 331 of file strong_vector.h.


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