Class vector_index_vector_size (o2scl)¶
-
template<class
data_t
>
classo2scl
::
vector_index_vector_size
¶ Index vector with a size method.
This object just returns the index whenever an object in the vector is requested, i.e.
operator[](i)
always returnsi
.Public Functions
-
vector_index_vector_size
(size_t n_)¶ Create an index vector with size
n_
.
-
size_t
size
() const¶ Get the size of the vector.
-
void
resize
(size_t n_)¶ Resize the index vector.
Protected Attributes
-
size_t
n
¶ The vector size.
-