![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
We often have a vector with fixed capacity reserved outside the hot loops. Using this class instead save the capacity but most importantly link a lot less code for the push_back() calls which allow more inlining.
#include <util.h>
Public Member Functions | |
| void | ClearAndReserve (size_t size) |
| T * | data () const |
| T * | begin () const |
| T * | end () const |
| size_t | size () const |
| bool | empty () const |
| T | operator[] (int i) const |
| T & | operator[] (int i) |
| T | back () const |
| T & | back () |
| void | clear () |
| void | resize (size_t size) |
| void | pop_back () |
| void | push_back (T t) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |