|
| | SpanSpan () |
| |
| | SpanSpan (const gsl::span< TIndex > &offsets, const gsl::span< TValue > &values) |
| |
| size_t | size () const |
| | Return the number of sub-vectors. More...
|
| |
| size_t | length () const |
| | Return the total number of values. More...
|
| |
| const gsl::span< TValue > | operator[] (size_t index) const |
| | Returns the i-th sub-vector. More...
|
| |
| const gsl::span< TIndex > & | offsets () const |
| | Returns the offsets of each sub-vectors. More...
|
| |
| const gsl::span< TValue > & | values () const |
| | Returns the concatenated values of all the sub-vectors. More...
|
| |
template<typename TIndex, typename TValue>
class maquina::SpanSpan< TIndex, TValue >
A view on a "vector of sub-vectors of values" container.
This view observes a container of type vector of sub-vectors of values. Those containers are composed of an offset vector and a value vector. The offset vector helds the offsets in the value vector of the first element of each sub-vector. The values vector contains the concatenated values of all the sub-vectors. Note that the offset vector must have a final additional entry needed to compute the size of the last sub-vector.