SDSL 3.0.3
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. | |
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, bool const is_plain=false) | |
Constructor for int_vector_buffer. | |
int_vector_buffer (int_vector_buffer &&ivb) | |
Move constructor. | |
~int_vector_buffer () | |
Destructor. | |
int_vector_buffer< t_width > & | operator= (int_vector_buffer &&ivb) |
Move assignment operator. | |
uint8_t | width () const |
Returns the width of the integers which are accessed via the [] operator. | |
uint64_t | size () const |
Returns the number of elements currently stored. | |
std::string | filename () const |
Returns the filename. | |
uint64_t | buffersize () const |
Returns the buffersize in bytes. | |
void | buffersize (uint64_t buffersize) |
Set the buffersize in bytes. | |
bool | good () |
Returns whether state of underlying streams are good. | |
bool | is_open () |
Returns whether underlying streams are currently associated to a file. | |
void | reset () |
Delete all content and set size to 0. | |
reference | operator[] (uint64_t idx) |
[] operator | |
void | push_back (const uint64_t value) |
Appends the given element value to the end of the int_vector_buffer. | |
void | close (bool remove_file=false) |
Close the int_vector_buffer. | |
iterator | begin () |
iterator | end () |
Definition at line 26 of file int_vector_buffer.hpp.
typedef int_vector<t_width>::difference_type sdsl::int_vector_buffer< t_width >::difference_type |
Definition at line 31 of file int_vector_buffer.hpp.
typedef int_vector<t_width>::value_type sdsl::int_vector_buffer< t_width >::value_type |
Definition at line 32 of file int_vector_buffer.hpp.
|
inline |
Constructor.
Definition at line 128 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 143 of file int_vector_buffer.hpp.
|
inline |
Move constructor.
Definition at line 190 of file int_vector_buffer.hpp.
|
inline |
Destructor.
Definition at line 216 of file int_vector_buffer.hpp.
|
inline |
Definition at line 386 of file int_vector_buffer.hpp.
|
inline |
Returns the buffersize in bytes.
Definition at line 269 of file int_vector_buffer.hpp.
|
inline |
Set the buffersize in bytes.
Definition at line 276 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 352 of file int_vector_buffer.hpp.
|
inline |
Definition at line 391 of file int_vector_buffer.hpp.
|
inline |
Returns the filename.
Definition at line 263 of file int_vector_buffer.hpp.
|
inline |
Returns whether state of underlying streams are good.
Definition at line 298 of file int_vector_buffer.hpp.
|
inline |
Returns whether underlying streams are currently associated to a file.
Definition at line 304 of file int_vector_buffer.hpp.
|
inline |
Move assignment operator.
Definition at line 222 of file int_vector_buffer.hpp.
|
inline |
[] operator
i | Index the i-th integer of length width(). |
Definition at line 337 of file int_vector_buffer.hpp.
|
inline |
Appends the given element value to the end of the int_vector_buffer.
Definition at line 343 of file int_vector_buffer.hpp.
|
inline |
Delete all content and set size to 0.
Definition at line 311 of file int_vector_buffer.hpp.
|
inline |
Returns the number of elements currently stored.
Definition at line 257 of file int_vector_buffer.hpp.
|
inline |
Returns the width of the integers which are accessed via the [] operator.
Definition at line 251 of file int_vector_buffer.hpp.