SDSL 3.0.1
Succinct Data Structure Library
|
#include <int_vector_buffer.hpp>
Classes | |
class | iterator |
class | reference |
Public Types | |
typedef int_vector< t_width >::difference_type | difference_type |
typedef int_vector< t_width >::value_type | value_type |
Public Member Functions | |
int_vector_buffer () | |
Constructor. More... | |
int_vector_buffer (const std::string filename, std::ios::openmode mode=std::ios::in, const uint64_t buffer_size=1024 *1024, const uint8_t int_width=t_width, const bool is_plain=false) | |
Constructor for int_vector_buffer. More... | |
int_vector_buffer (int_vector_buffer &&ivb) | |
Move constructor. More... | |
~int_vector_buffer () | |
Destructor. More... | |
int_vector_buffer< t_width > & | operator= (int_vector_buffer &&ivb) |
Move assignment operator. More... | |
uint8_t | width () const |
Returns the width of the integers which are accessed via the [] operator. More... | |
uint64_t | size () const |
Returns the number of elements currently stored. More... | |
std::string | filename () const |
Returns the filename. More... | |
uint64_t | buffersize () const |
Returns the buffersize in bytes. More... | |
void | buffersize (uint64_t buffersize) |
Set the buffersize in bytes. More... | |
bool | good () |
Returns whether state of underlying streams are good. More... | |
bool | is_open () |
Returns whether underlying streams are currently associated to a file. More... | |
void | reset () |
Delete all content and set size to 0. More... | |
reference | operator[] (uint64_t idx) |
[] operator More... | |
void | push_back (const uint64_t value) |
Appends the given element value to the end of the int_vector_buffer. More... | |
void | close (bool remove_file=false) |
Close the int_vector_buffer. More... | |
iterator | begin () |
iterator | end () |
Definition at line 24 of file int_vector_buffer.hpp.
typedef int_vector<t_width>::difference_type sdsl::int_vector_buffer< t_width >::difference_type |
Definition at line 28 of file int_vector_buffer.hpp.
typedef int_vector<t_width>::value_type sdsl::int_vector_buffer< t_width >::value_type |
Definition at line 29 of file int_vector_buffer.hpp.
|
inline |
Constructor.
Definition at line 113 of file int_vector_buffer.hpp.
|
inline |
Constructor for int_vector_buffer.
filename | File that contains the data read from / written to. |
mode | Openmode: std::ios::in opens an existing file (that must exist already), std::ios::out creates a new file (that may exist already). |
buffersize | Buffersize in bytes. This has to be a multiple of 8, if not the next multiple of 8 will be taken |
int_width | The width of each integer. |
is_plain | If false (default) the file will be interpreted as int_vector. If true the file will be interpreted as plain array with t_width bits per integer. In second case (is_plain==true), t_width must be 8, 16, 32 or 64. |
Definition at line 125 of file int_vector_buffer.hpp.
|
inline |
Move constructor.
Definition at line 172 of file int_vector_buffer.hpp.
|
inline |
Destructor.
Definition at line 198 of file int_vector_buffer.hpp.
|
inline |
Definition at line 342 of file int_vector_buffer.hpp.
|
inline |
Returns the buffersize in bytes.
Definition at line 239 of file int_vector_buffer.hpp.
|
inline |
Set the buffersize in bytes.
Definition at line 246 of file int_vector_buffer.hpp.
|
inline |
Close the int_vector_buffer.
It is not possible to read from / write into the int_vector_buffer after calling this method
remove_file | If true, the underlying file will be removed on closing. |
Definition at line 311 of file int_vector_buffer.hpp.
|
inline |
Definition at line 344 of file int_vector_buffer.hpp.
|
inline |
Returns the filename.
Definition at line 236 of file int_vector_buffer.hpp.
|
inline |
Returns whether state of underlying streams are good.
Definition at line 266 of file int_vector_buffer.hpp.
|
inline |
Returns whether underlying streams are currently associated to a file.
Definition at line 269 of file int_vector_buffer.hpp.
|
inline |
Move assignment operator.
Definition at line 201 of file int_vector_buffer.hpp.
|
inline |
[] operator
i | Index the i-th integer of length width(). |
Definition at line 302 of file int_vector_buffer.hpp.
|
inline |
Appends the given element value to the end of the int_vector_buffer.
Definition at line 305 of file int_vector_buffer.hpp.
|
inline |
Delete all content and set size to 0.
Definition at line 276 of file int_vector_buffer.hpp.
|
inline |
Returns the number of elements currently stored.
Definition at line 233 of file int_vector_buffer.hpp.
|
inline |
Returns the width of the integers which are accessed via the [] operator.
Definition at line 230 of file int_vector_buffer.hpp.