SDSL 3.0.3
Succinct Data Structure Library
|
A generic vector class for integers of width
#include <int_vector.hpp>
Classes | |
struct | raw_wrapper |
Public Types | |
typedef int_vector_trait< t_width >::value_type | value_type |
typedef int_vector_trait< t_width >::iterator | iterator |
typedef int_vector_trait< t_width >::const_iterator | const_iterator |
typedef int_vector_trait< t_width >::reference | reference |
typedef int_vector_trait< t_width >::const_reference | const_reference |
typedef int_vector_reference< int_vector > * | pointer |
typedef value_type const * | const_pointer |
typedef ptrdiff_t | difference_type |
typedef int_vector_size_type | size_type |
typedef int_vector_trait< t_width >::int_width_type | int_width_type |
typedef rank_support_v< 1, 1 > | rank_1_type |
typedef rank_support_v< 0, 1 > | rank_0_type |
typedef select_support_mcl< 1, 1 > | select_1_type |
typedef select_support_mcl< 0, 1 > | select_0_type |
typedef int_vec_category_trait< t_width >::type | index_category |
Public Member Functions | |
int_vector (size_type size, value_type default_value, uint8_t int_width=t_width) | |
Constructor for int_vector. | |
int_vector (size_type size=0) | |
Constructor to fix possible comparison with integeres issue. | |
int_vector (std::initializer_list< value_type > il) | |
Constructor for initializer_list. | |
template<typename input_iterator_t > | |
int_vector (typename std::enable_if< std::is_base_of< std::input_iterator_tag, typename std::iterator_traits< input_iterator_t >::iterator_category >::value, input_iterator_t >::type first, input_iterator_t last) | |
Constructor for iterator range. | |
void | clear () noexcept |
Clearing the int_vector. Allocated memory will not be released. | |
iterator | erase (const_iterator it) |
Remove element that iterator is pointing to. | |
iterator | erase (const_iterator first, const_iterator last) |
Remove elements in given iterator range. | |
template<class... Args> | |
iterator | emplace (const_iterator it, Args &&... args) |
Insert an element constructed with std::forward<Args>(args) before the element that the iterator is pointing to. | |
iterator | insert (const_iterator it, value_type value) |
Insert an element before the element that the iterator is pointing to. | |
iterator | insert (const_iterator it, size_type n, value_type value) |
Insert n copies of an element before the element that the iterator is pointing to. | |
iterator | insert (const_iterator it, std::initializer_list< value_type > il) |
Insert elements from intializer_list before the element that the iterator is pointing to. | |
template<typename input_iterator_t > | |
std::enable_if< std::is_base_of< std::input_iterator_tag, typenamestd::iterator_traits< input_iterator_t >::iterator_category >::value, iterator >::type | insert (const_iterator it, input_iterator_t first, input_iterator_t last) |
Insert elements from an iterator pair before the element that the iterator it is pointing to. | |
reference | front () noexcept |
Returns first element. | |
const_reference | front () const noexcept |
Returns first element. | |
reference | back () noexcept |
Returns last element. | |
const_reference | back () const noexcept |
Returns last element. | |
template<class... Args> | |
void | emplace_back (Args &&... args) |
Insert an element constructed with std::forward<Args>(args) at the end. | |
void | push_back (value_type value) |
Insert element at the end. | |
void | pop_back () |
Remove element at the end. | |
int_vector (int_vector &&v) | |
Move constructor. | |
int_vector (int_vector const &v) | |
Copy constructor. | |
~int_vector () | |
Destructor. | |
void | assign (size_type size, value_type default_value) |
Assign. Resize int_vector to size and fill elements with default_value . | |
void | assign (std::initializer_list< value_type > il) |
Assign. Resize int_vector and initialize with initializer_list. | |
template<typename input_iterator_t > | |
void | assign (input_iterator_t first, input_iterator_t last) |
Assign. Resize int_vector and initialize by copying from an iterator range. | |
bool | empty () const noexcept |
Equivalent to size() == 0. | |
void | swap (int_vector &v) noexcept |
Swap method for int_vector. | |
void | shrink_to_fit () |
Free unused allocated memory. | |
void | reserve (size_type capacity) |
Reserve storage. If the new capacity is smaller than the current, this method does nothing. | |
void | resize (const size_type size) |
Resize the int_vector in terms of elements. | |
void | resize (const size_type size, const value_type value) |
Resize the int_vector in terms of elements. Only as much space as necessary is allocated. | |
void | bit_resize (const size_type size) |
Resize the int_vector in terms of bits. Only as much space as necessary is allocated. | |
size_type | size () const noexcept |
The number of elements in the int_vector. | |
size_type | bit_size () const noexcept |
The number of bits in the int_vector. | |
size_type | capacity () const noexcept |
Returns the size of the occupied bits of the int_vector. | |
size_type | bit_capacity () const noexcept |
Returns the size of the occupied bits of the int_vector. | |
uint64_t const * | data () const noexcept |
Pointer to the raw data of the int_vector. | |
uint64_t * | data () noexcept |
Pointer to the raw data of the int_vector. | |
value_type | get_int (size_type idx, const uint8_t len=64) const |
Get the integer value of the binary string of length len starting at position idx in the int_vector. | |
void | set_int (size_type idx, value_type x, const uint8_t len=64) |
Set the bits from position idx to idx+len-1 to the binary representation of integer x. | |
uint8_t | width () const noexcept |
Returns the width of the integers which are accessed via the [] operator. | |
void | width (uint8_t new_width) noexcept |
Sets the width of the integers which are accessed via the [] operator, if t_width equals 0. | |
size_type | write_data (std::ostream &out) const |
size_type | serialize (std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const |
Serializes the int_vector to a stream. | |
void | load (std::istream &in) |
Load the int_vector for a stream. | |
template<typename archive_t > | |
std::enable_if<!cereal::traits::is_output_serializable< cereal::BinaryData< int_vector< t_width > >, archive_t >::value, void >::type | CEREAL_SAVE_FUNCTION_NAME (archive_t &ar) const |
Serialise (save) via cereal if archive is not binary. | |
template<typename archive_t > | |
std::enable_if< cereal::traits::is_output_serializable< cereal::BinaryData< int_vector< t_width > >, archive_t >::value, void >::type | CEREAL_SAVE_FUNCTION_NAME (archive_t &ar) const |
Serialise (save) via cereal if archive is binary. | |
template<typename archive_t > | |
std::enable_if<!cereal::traits::is_input_serializable< cereal::BinaryData< int_vector< t_width > >, archive_t >::value, void >::type | CEREAL_LOAD_FUNCTION_NAME (archive_t &ar) |
Serialise (load) via cereal if archive is not binary. | |
template<typename archive_t > | |
std::enable_if< cereal::traits::is_input_serializable< cereal::BinaryData< int_vector< t_width > >, archive_t >::value, void >::type | CEREAL_LOAD_FUNCTION_NAME (archive_t &ar) |
Serialise (save) via cereal if archive is binary. | |
reference | operator[] (size_type const &i) noexcept |
non const version of [] operator | |
const_reference | operator[] (size_type const &i) const noexcept |
const version of [] operator | |
reference | at (size_type const &i) |
non const version of at() function | |
const_reference | at (size_type const &i) const |
const version of at() function | |
int_vector & | operator= (int_vector const &v) |
Assignment operator. | |
int_vector & | operator= (int_vector &&v) |
Move assignment operator. | |
bool | operator== (int_vector< t_width > const &v) const noexcept |
Equality operator for two int_vectors. | |
template<uint8_t t_width2> | |
bool | operator== (int_vector< t_width2 > const &v) const noexcept |
Equality operator for two int_vectors. | |
template<uint8_t t_width2> | |
bool | operator!= (int_vector< t_width2 > const &v) const noexcept |
Inequality operator for two int_vectors. | |
bool | operator< (int_vector const &v) const noexcept |
Less operator for two int_vectors. | |
bool | operator> (int_vector const &v) const noexcept |
Greater operator for two int_vectors. | |
bool | operator<= (int_vector const &v) const noexcept |
Less or equal operator. | |
bool | operator>= (int_vector const &v) const noexcept |
Greater of equal operator. | |
int_vector & | operator&= (int_vector const &v) |
bitwise-and-update operator | |
int_vector & | operator|= (int_vector const &v) |
bitwise-or-update equal operator | |
int_vector & | operator^= (int_vector const &v) |
bitwise-xor-update operator | |
iterator | begin () noexcept |
Iterator that points to the first element of the int_vector. | |
iterator | end () noexcept |
Iterator that points to the element after the last element of int_vector. | |
const_iterator | begin () const noexcept |
Const iterator that points to the first element of the int_vector. | |
const_iterator | end () const noexcept |
Const iterator that points to the element after the last element of int_vector. | |
const_iterator | cbegin () const noexcept |
Const iterator that points to the first element of the int_vector. | |
const_iterator | cend () const noexcept |
Const iterator that points to the element after the last element of int_vector. | |
void | flip () |
Flip all bits of bit_vector. | |
int_vector< 64 >::size_type | size () const noexcept |
int_vector< 32 >::size_type | size () const noexcept |
int_vector< 16 >::size_type | size () const noexcept |
int_vector< 8 >::size_type | size () const noexcept |
int_vector< 1 >::size_type | size () const noexcept |
int_vector< 0 >::size_type | size () const noexcept |
int_vector< 64 >::size_type | capacity () const noexcept |
int_vector< 32 >::size_type | capacity () const noexcept |
int_vector< 16 >::size_type | capacity () const noexcept |
int_vector< 8 >::size_type | capacity () const noexcept |
int_vector< 1 >::size_type | capacity () const noexcept |
int_vector< 0 >::size_type | capacity () const noexcept |
auto | operator[] (size_type const &idx) noexcept -> reference |
auto | operator[] (size_type const &idx) noexcept -> reference |
auto | operator[] (size_type const &idx) noexcept -> reference |
auto | operator[] (size_type const &idx) noexcept -> reference |
auto | operator[] (size_type const &idx) const noexcept -> const_reference |
auto | operator[] (size_type const &idx) const noexcept -> const_reference |
auto | operator[] (size_type const &idx) const noexcept -> const_reference |
auto | operator[] (size_type const &idx) const noexcept -> const_reference |
auto | operator[] (size_type const &idx) const noexcept -> const_reference |
auto | operator[] (size_type const &idx) const noexcept -> const_reference |
Static Public Member Functions | |
static size_type | max_size () noexcept |
Maximum size of the int_vector. | |
static size_t | read_header (int_vector_size_type &size, int_width_type &int_width, std::istream &in) |
Read the size and int_width of a int_vector. | |
static uint64_t | write_header (uint64_t size, uint8_t int_width, std::ostream &out) |
Write the size and int_width of a int_vector. | |
Public Attributes | |
float | growth_factor = 1.5 |
Growth factor for amortized constant time operations. | |
const raw_wrapper | raw = raw_wrapper(*this) |
Static Public Attributes | |
static constexpr uint8_t | fixed_int_width = t_width |
Friends | |
struct | int_vector_trait< t_width > |
class | int_vector_iterator_base< int_vector > |
class | int_vector_iterator< int_vector > |
class | int_vector_const_iterator< int_vector > |
template<uint8_t , std::ios_base::openmode > | |
class | int_vector_mapper |
template<typename T > | |
class | coder::elias_delta |
template<typename T > | |
class | coder::elias_gamma |
template<typename T > | |
class | coder::fibonacci |
template<uint8_t > | |
class | coder::comma |
class | memory_manager |
A generic vector class for integers of width
This generic vector class could be used to generate a vector that contains integers of fixed width
t_width | Width of the integer. If set to 0 it is variable during runtime, otherwise fixed at compile time. |
int_vector_trait<t_width>::const_iterator sdsl::int_vector< uint8_t >::const_iterator |
Definition at line 219 of file int_vector.hpp.
value_type const* sdsl::int_vector< uint8_t >::const_pointer |
Definition at line 223 of file int_vector.hpp.
int_vector_trait<t_width>::const_reference sdsl::int_vector< uint8_t >::const_reference |
Definition at line 221 of file int_vector.hpp.
ptrdiff_t sdsl::int_vector< uint8_t >::difference_type |
Definition at line 224 of file int_vector.hpp.
int_vec_category_trait<t_width>::type sdsl::int_vector< uint8_t >::index_category |
Definition at line 231 of file int_vector.hpp.
int_vector_trait<t_width>::int_width_type sdsl::int_vector< uint8_t >::int_width_type |
Definition at line 226 of file int_vector.hpp.
int_vector_trait<t_width>::iterator sdsl::int_vector< uint8_t >::iterator |
Definition at line 218 of file int_vector.hpp.
int_vector_reference<int_vector>* sdsl::int_vector< uint8_t >::pointer |
Definition at line 222 of file int_vector.hpp.
rank_support_v<0, 1> sdsl::int_vector< uint8_t >::rank_0_type |
Definition at line 228 of file int_vector.hpp.
rank_support_v<1, 1> sdsl::int_vector< uint8_t >::rank_1_type |
Definition at line 227 of file int_vector.hpp.
int_vector_trait<t_width>::reference sdsl::int_vector< uint8_t >::reference |
Definition at line 220 of file int_vector.hpp.
select_support_mcl<0, 1> sdsl::int_vector< uint8_t >::select_0_type |
Definition at line 230 of file int_vector.hpp.
select_support_mcl<1, 1> sdsl::int_vector< uint8_t >::select_1_type |
Definition at line 229 of file int_vector.hpp.
int_vector_size_type sdsl::int_vector< uint8_t >::size_type |
Definition at line 225 of file int_vector.hpp.
int_vector_trait<t_width>::value_type sdsl::int_vector< uint8_t >::value_type |
Definition at line 217 of file int_vector.hpp.
|
inline |
Constructor for int_vector.
size | Number of elements. Default value is 0. |
default_value | Initialize all value to default value . |
int_width | The width of each integer. |
Definition at line 1588 of file int_vector.hpp.
|
inlineexplicit |
Constructor to fix possible comparison with integeres issue.
Definition at line 312 of file int_vector.hpp.
|
inline |
Constructor for initializer_list.
Definition at line 315 of file int_vector.hpp.
|
inline |
Constructor for iterator range.
first | Iterator pointing to first element to be copied. |
last | Iterator pointing to the element behind the last one to be copied. |
Definition at line 325 of file int_vector.hpp.
|
inline |
Move constructor.
Definition at line 1599 of file int_vector.hpp.
|
inline |
Copy constructor.
Definition at line 1611 of file int_vector.hpp.
sdsl::int_vector< t_width >::~int_vector | ( | ) |
Destructor.
Definition at line 1658 of file int_vector.hpp.
|
inline |
Assign. Resize int_vector and initialize by copying from an iterator range.
first | Iterator pointing to first element to be inserted. |
last | Iterator pointing to the elemnt after the one to be inserted. |
Definition at line 514 of file int_vector.hpp.
|
inline |
Assign. Resize int_vector to size
and fill elements with default_value
.
size | Number of elements. |
default_value | Elements to be inserted. |
Definition at line 490 of file int_vector.hpp.
|
inline |
Assign. Resize int_vector and initialize with initializer_list.
il | Initializer_list. |
Definition at line 499 of file int_vector.hpp.
|
inline |
non const version of at() function
i | Index the i-th integer of length width(). |
Definition at line 730 of file int_vector.hpp.
|
inline |
const version of at() function
i | Index the i-th integer of length width(). |
Definition at line 739 of file int_vector.hpp.
|
inlinenoexcept |
Returns last element.
Definition at line 448 of file int_vector.hpp.
|
inlinenoexcept |
Returns last element.
Definition at line 442 of file int_vector.hpp.
|
inlinenoexcept |
Const iterator that points to the first element of the int_vector.
Definition at line 847 of file int_vector.hpp.
|
inlinenoexcept |
Iterator that points to the first element of the int_vector.
Time complexity guaranty is O(1).
Definition at line 833 of file int_vector.hpp.
|
inlinenoexcept |
Returns the size of the occupied bits of the int_vector.
The bit_capacity of a int_vector is greater or equal to the bit_size of the vector: bit_capacity() >= bit_size().
Definition at line 611 of file int_vector.hpp.
void sdsl::int_vector< t_width >::bit_resize | ( | const size_type | size | ) |
Resize the int_vector in terms of bits. Only as much space as necessary is allocated.
size | The size to resize the int_vector in terms of bits. |
Definition at line 1671 of file int_vector.hpp.
|
inlinenoexcept |
The number of bits in the int_vector.
Definition at line 594 of file int_vector.hpp.
|
inlinenoexcept |
Returns the size of the occupied bits of the int_vector.
The capacity of a int_vector is greater or equal to the size of the vector: capacity() >= size().
Definition at line 1770 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1777 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1784 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1791 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1798 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1805 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1812 of file int_vector.hpp.
|
inlinenoexcept |
Const iterator that points to the first element of the int_vector.
Definition at line 859 of file int_vector.hpp.
|
inlinenoexcept |
Const iterator that points to the element after the last element of int_vector.
Definition at line 865 of file int_vector.hpp.
|
inline |
Serialise (load) via cereal if archive is not binary.
Definition at line 2056 of file int_vector.hpp.
|
inline |
Serialise (save) via cereal if archive is binary.
|
inline |
Serialise (save) via cereal if archive is not binary.
Definition at line 2029 of file int_vector.hpp.
|
inline |
Serialise (save) via cereal if archive is binary.
|
inlinenoexcept |
Clearing the int_vector. Allocated memory will not be released.
Definition at line 338 of file int_vector.hpp.
|
inlinenoexcept |
Pointer to the raw data of the int_vector.
Definition at line 619 of file int_vector.hpp.
|
inlinenoexcept |
Pointer to the raw data of the int_vector.
Definition at line 627 of file int_vector.hpp.
|
inline |
Insert an element constructed with std::forward<Args>(args) before the element that the iterator is pointing to.
it | Iterator pointing to an element in int_vector. |
args | Function parameter pack. |
Definition at line 372 of file int_vector.hpp.
|
inline |
Insert an element constructed with std::forward<Args>(args) at the end.
args | Function parameter pack. |
Definition at line 457 of file int_vector.hpp.
|
inlinenoexcept |
Equivalent to size() == 0.
Definition at line 526 of file int_vector.hpp.
|
inlinenoexcept |
Const iterator that points to the element after the last element of int_vector.
Definition at line 853 of file int_vector.hpp.
|
inlinenoexcept |
Iterator that points to the element after the last element of int_vector.
Time complexity guaranty is O(1).
Definition at line 841 of file int_vector.hpp.
|
inline |
Remove elements in given iterator range.
first | Iterator pointing to first element to be deleted. |
last | Iterator pointing to the elemnt after the one to be deleted. |
Definition at line 358 of file int_vector.hpp.
|
inline |
Remove element that iterator is pointing to.
it | Iterator pointing to an element in int_vector |
Definition at line 346 of file int_vector.hpp.
|
inline |
Flip all bits of bit_vector.
Definition at line 871 of file int_vector.hpp.
|
inlinenoexcept |
Returns first element.
Definition at line 436 of file int_vector.hpp.
|
inlinenoexcept |
Returns first element.
Definition at line 430 of file int_vector.hpp.
auto sdsl::int_vector< t_width >::get_int | ( | size_type | idx, |
const uint8_t | len = 64 ) const |
Get the integer value of the binary string of length len starting at position idx in the int_vector.
idx | Starting index of the binary representation of the integer. |
len | Length of the binary representation of the integer. Default value is 64. |
Definition at line 1690 of file int_vector.hpp.
|
inline |
Insert elements from an iterator pair before the element that the iterator it
is pointing to.
it | Iterator pointing to an element in int_vector. |
first | Iterator pointing to first element to be inserted. |
last | Iterator pointing to the elemnt after the one to be inserted. |
Definition at line 419 of file int_vector.hpp.
|
inline |
Insert n copies of an element before the element that the iterator is pointing to.
it | Iterator pointing to an element in int_vector. |
n | Number of copies. |
value | Element to be inserted. |
Definition at line 391 of file int_vector.hpp.
|
inline |
Insert elements from intializer_list before the element that the iterator is pointing to.
it | Iterator pointing to an element in int_vector. |
il | Elements to be inserted. |
Definition at line 405 of file int_vector.hpp.
|
inline |
Insert an element before the element that the iterator is pointing to.
it | Iterator pointing to an element in int_vector. |
value | Element to be inserted. |
Definition at line 381 of file int_vector.hpp.
void sdsl::int_vector< t_width >::load | ( | std::istream & | in | ) |
Load the int_vector for a stream.
Definition at line 2007 of file int_vector.hpp.
|
inlinestaticnoexcept |
Maximum size of the int_vector.
Definition at line 586 of file int_vector.hpp.
|
inlinenoexcept |
Inequality operator for two int_vectors.
Two int_vectors are not equal if
Definition at line 795 of file int_vector.hpp.
int_vector< t_width > & sdsl::int_vector< t_width >::operator&= | ( | int_vector< uint8_t > const & | v | ) |
bitwise-and-update operator
Definition at line 1951 of file int_vector.hpp.
|
noexcept |
Less operator for two int_vectors.
int_vector w is less than v if
Definition at line 1907 of file int_vector.hpp.
|
noexcept |
Less or equal operator.
Definition at line 1939 of file int_vector.hpp.
int_vector< t_width > & sdsl::int_vector< t_width >::operator= | ( | int_vector< uint8_t > && | v | ) |
Move assignment operator.
Definition at line 1640 of file int_vector.hpp.
int_vector< t_width > & sdsl::int_vector< t_width >::operator= | ( | int_vector< uint8_t > const & | v | ) |
Assignment operator.
v | The vector v which should be assigned |
Definition at line 1629 of file int_vector.hpp.
|
inlinenoexcept |
Equality operator for two int_vectors.
Two int_vectors are equal if
Definition at line 757 of file int_vector.hpp.
|
inlinenoexcept |
Equality operator for two int_vectors.
Note that this function is slow since it compares element by element and cannot compare the bit representations of the containers. Two containers are equal if
Definition at line 782 of file int_vector.hpp.
|
noexcept |
Greater operator for two int_vectors.
int_vector w is greater than v if
Definition at line 1923 of file int_vector.hpp.
|
noexcept |
Greater of equal operator.
Definition at line 1945 of file int_vector.hpp.
|
inlinenoexcept |
const version of [] operator
i | Index the i-th integer of length width(). |
Definition at line 1858 of file int_vector.hpp.
|
inlinenoexcept |
non const version of [] operator
i | Index the i-th integer of length width(). |
Definition at line 1818 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1865 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1872 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1879 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1886 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1893 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1900 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1827 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1835 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1843 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1851 of file int_vector.hpp.
int_vector< t_width > & sdsl::int_vector< t_width >::operator^= | ( | int_vector< uint8_t > const & | v | ) |
bitwise-xor-update operator
Definition at line 1969 of file int_vector.hpp.
int_vector< t_width > & sdsl::int_vector< t_width >::operator|= | ( | int_vector< uint8_t > const & | v | ) |
bitwise-or-update equal operator
Definition at line 1960 of file int_vector.hpp.
|
inline |
Remove element at the end.
Definition at line 472 of file int_vector.hpp.
|
inline |
Insert element at the end.
value | Element to be inserted. |
Definition at line 465 of file int_vector.hpp.
|
inlinestatic |
Read the size and int_width of a int_vector.
Definition at line 884 of file int_vector.hpp.
|
inline |
Reserve storage. If the new capacity is smaller than the current, this method does nothing.
capacity | New capacity in bits |
Definition at line 546 of file int_vector.hpp.
|
inline |
Resize the int_vector in terms of elements.
If the current size is smaller than size
, the additional elements are initialized with 0.
Only as much space as necessary is being allocated.
size | Number of elements. |
Definition at line 559 of file int_vector.hpp.
|
inline |
Resize the int_vector in terms of elements. Only as much space as necessary is allocated.
size | The size to resize the int_vector in terms of elements. |
value | If the current size is smaller than size , the additional elements are initialized with value. |
Definition at line 568 of file int_vector.hpp.
int_vector< t_width >::size_type sdsl::int_vector< t_width >::serialize | ( | std::ostream & | out, |
structure_tree_node * | v = nullptr, | ||
std::string | name = "" ) const |
Serializes the int_vector to a stream.
Definition at line 1997 of file int_vector.hpp.
|
inline |
Set the bits from position idx to idx+len-1 to the binary representation of integer x.
The bit at position idx represents the least significant bit(lsb), and the bit at position idx+len-1 the most significant bit (msb) of x.
idx | Starting index of the binary representation of x. |
x | The integer to store in the int_vector. |
len | The length used to store x in the int_vector. Default value is 64. |
Definition at line 1706 of file int_vector.hpp.
|
inline |
Free unused allocated memory.
Definition at line 538 of file int_vector.hpp.
|
inlinenoexcept |
The number of elements in the int_vector.
Definition at line 1722 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1729 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1736 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1743 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1750 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1757 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1764 of file int_vector.hpp.
|
inlinenoexcept |
Swap method for int_vector.
Definition at line 532 of file int_vector.hpp.
|
inlinenoexcept |
Returns the width of the integers which are accessed via the [] operator.
Definition at line 654 of file int_vector.hpp.
|
inlinenoexcept |
Sets the width of the integers which are accessed via the [] operator, if t_width equals 0.
new_width | New width of the integers accessed via the [] operator. |
Definition at line 664 of file int_vector.hpp.
int_vector< t_width >::size_type sdsl::int_vector< t_width >::write_data | ( | std::ostream & | out | ) | const |
Definition at line 1978 of file int_vector.hpp.
|
inlinestatic |
Write the size and int_width of a int_vector.
Definition at line 904 of file int_vector.hpp.
Definition at line 246 of file int_vector.hpp.
Definition at line 240 of file int_vector.hpp.
Definition at line 242 of file int_vector.hpp.
Definition at line 244 of file int_vector.hpp.
|
friend |
Definition at line 231 of file int_vector.hpp.
|
friend |
Definition at line 231 of file int_vector.hpp.
|
friend |
Definition at line 231 of file int_vector.hpp.
|
friend |
Definition at line 238 of file int_vector.hpp.
|
friend |
Definition at line 231 of file int_vector.hpp.
|
friend |
Definition at line 247 of file int_vector.hpp.
|
staticconstexpr |
Definition at line 248 of file int_vector.hpp.
float sdsl::int_vector< uint8_t >::growth_factor = 1.5 |
Growth factor for amortized constant time operations.
Definition at line 249 of file int_vector.hpp.
const raw_wrapper sdsl::int_vector< uint8_t >::raw = raw_wrapper(*this) |
Definition at line 934 of file int_vector.hpp.