Public Member Functions | Protected Attributes | List of all members
o2scl::vector_index_vector_size< data_t > Class Template Reference

Index vector with a size method. More...

#include <vector.h>

Detailed Description

template<class data_t>
class o2scl::vector_index_vector_size< data_t >

This object just returns the index whenever an object in the vector is requested, i.e. operator[](i) always returns i.

Definition at line 2538 of file vector.h.

Public Member Functions

 vector_index_vector_size (size_t n_)
 Create an index vector with size n_.
 
data_t operator[] (size_t &i) const
 Obtain the element with index i.
 
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.
 

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

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).