template<typename IndexT, typename T>
class util::internal::SVector< IndexT, T >
A vector-like class where valid indices are in [- size_, size_) and reserved indices for future growth are in [- capacity_, capacity_). It is used to hold arc related information for graphs with reverse arcs. It supports only up to 2^31-1 elements, for compactness. If you ever need more, consider using templates for the size/capacity integer types.
Sample usage:
SVector<int> v; v.grow(left_value, right_value); v.resize(10); v.clear(); v.swap(new_v); std:swap(v[i], v[~i]);
Definition at line 421 of file graph.h.
template<typename IndexT, typename T>
NOTE(user): This doesn't currently support movable-only objects, but we could fix that.
We have to copy the elements because they are allowed to be element of *this.
Definition at line 526 of file graph.h.
template<typename IndexT, typename T>
NOTE(user): Alternatively, our capacity could inherit from the other vector's capacity, which can be (much) greater than its size.
Perform the actual copy of the payload.
Definition at line 431 of file graph.h.