OR-Tools  8.2
VectorMap< T >

Detailed Description

template<class T>
class operations_research::VectorMap< T >

Definition at line 30 of file vector_map.h.

Public Types

typedef T value_type
 
typedef const T * pointer
 
typedef const T & reference
 
typedef const T & const_reference
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef const T * const_iterator
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 

Public Member Functions

int Add (const T &element)
 
void Add (const std::vector< T > &elements)
 
int IndexOrDie (const T &element) const
 
int Index (const T &element) const
 
bool Contains (const T &element) const
 
const T & Element (int index) const
 
const T & operator[] (int index) const
 
int size () const
 
void clear ()
 
const std::vector< T > & list () const
 
const_iterator begin () const
 
const_iterator end () const
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 

Static Public Attributes

static const size_type npos
 

Member Typedef Documentation

◆ const_iterator

typedef const T* const_iterator

Definition at line 100 of file vector_map.h.

◆ const_reference

typedef const T& const_reference

Definition at line 96 of file vector_map.h.

◆ const_reverse_iterator

typedef std::reverse_iterator<const_iterator> const_reverse_iterator

Definition at line 101 of file vector_map.h.

◆ difference_type

typedef ptrdiff_t difference_type

Definition at line 98 of file vector_map.h.

◆ pointer

typedef const T* pointer

Definition at line 94 of file vector_map.h.

◆ reference

typedef const T& reference

Definition at line 95 of file vector_map.h.

◆ size_type

typedef size_t size_type

Definition at line 97 of file vector_map.h.

◆ value_type

typedef T value_type

Definition at line 93 of file vector_map.h.

Member Function Documentation

◆ Add() [1/2]

void Add ( const std::vector< T > &  elements)
inline

Definition at line 48 of file vector_map.h.

◆ Add() [2/2]

int Add ( const T &  element)
inline

Definition at line 34 of file vector_map.h.

◆ begin()

const_iterator begin ( ) const
inline

Definition at line 102 of file vector_map.h.

◆ clear()

void clear ( )
inline

Definition at line 84 of file vector_map.h.

◆ Contains()

bool Contains ( const T &  element) const
inline

Definition at line 67 of file vector_map.h.

◆ Element()

const T & Element ( int  index) const
inline

Definition at line 72 of file vector_map.h.

◆ end()

const_iterator end ( ) const
inline

Definition at line 103 of file vector_map.h.

◆ Index()

int Index ( const T &  element) const
inline

Definition at line 61 of file vector_map.h.

◆ IndexOrDie()

int IndexOrDie ( const T &  element) const
inline

Definition at line 55 of file vector_map.h.

◆ list()

const std::vector< T > & list ( ) const
inline

Definition at line 90 of file vector_map.h.

◆ operator[]()

const T & operator[] ( int  index) const
inline

Definition at line 78 of file vector_map.h.

◆ rbegin()

const_reverse_iterator rbegin ( ) const
inline

Definition at line 104 of file vector_map.h.

◆ rend()

const_reverse_iterator rend ( ) const
inline

Definition at line 107 of file vector_map.h.

◆ size()

int size ( ) const
inline

Definition at line 81 of file vector_map.h.

Member Data Documentation

◆ npos

const size_type npos
static

Definition at line 99 of file vector_map.h.


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