SDSL 3.0.1
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 const value_type * | 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 (const int_vector &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. | |
const uint64_t * | 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[] (const size_type &i) noexcept |
non const version of [] operator | |
const_reference | operator[] (const size_type &i) const noexcept |
const version of [] operator | |
reference | at (const size_type &i) |
non const version of at() function | |
const_reference | at (const size_type &i) const |
const version of at() function | |
int_vector & | operator= (const int_vector &v) |
Assignment operator. | |
int_vector & | operator= (int_vector &&v) |
Move assignment operator. | |
bool | operator== (const int_vector< t_width > &v) const noexcept |
Equality operator for two int_vectors. | |
template<uint8_t t_width2> | |
bool | operator!= (const int_vector< t_width2 > &v) const noexcept |
Inequality operator for two int_vectors. | |
bool | operator< (const int_vector &v) const noexcept |
Less operator for two int_vectors. | |
bool | operator> (const int_vector &v) const noexcept |
Greater operator for two int_vectors. | |
bool | operator<= (const int_vector &v) const noexcept |
Less or equal operator. | |
bool | operator>= (const int_vector &v) const noexcept |
Greater of equal operator. | |
int_vector & | operator&= (const int_vector &v) |
bitwise-and-update operator | |
int_vector & | operator|= (const int_vector &v) |
bitwise-or-update equal operator | |
int_vector & | operator^= (const int_vector &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[] (const size_type &idx) noexcept -> reference |
auto | operator[] (const size_type &idx) noexcept -> reference |
auto | operator[] (const size_type &idx) noexcept -> reference |
auto | operator[] (const size_type &idx) noexcept -> reference |
auto | operator[] (const size_type &idx) const noexcept -> const_reference |
auto | operator[] (const size_type &idx) const noexcept -> const_reference |
auto | operator[] (const size_type &idx) const noexcept -> const_reference |
auto | operator[] (const size_type &idx) const noexcept -> const_reference |
auto | operator[] (const size_type &idx) const noexcept -> const_reference |
auto | operator[] (const size_type &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 |
template<class container > | |
bool | operator== (const int_vector< t_width > &lhs, const container &rhs) noexcept |
Equality operator for an arbitrary container. | |
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. |
Definition at line 215 of file int_vector.hpp.
typedef int_vector_trait<t_width>::const_iterator sdsl::int_vector< t_width >::const_iterator |
Definition at line 223 of file int_vector.hpp.
typedef const value_type* sdsl::int_vector< t_width >::const_pointer |
Definition at line 227 of file int_vector.hpp.
typedef int_vector_trait<t_width>::const_reference sdsl::int_vector< t_width >::const_reference |
Definition at line 225 of file int_vector.hpp.
typedef ptrdiff_t sdsl::int_vector< t_width >::difference_type |
Definition at line 228 of file int_vector.hpp.
typedef int_vec_category_trait<t_width>::type sdsl::int_vector< t_width >::index_category |
Definition at line 235 of file int_vector.hpp.
typedef int_vector_trait<t_width>::int_width_type sdsl::int_vector< t_width >::int_width_type |
Definition at line 230 of file int_vector.hpp.
typedef int_vector_trait<t_width>::iterator sdsl::int_vector< t_width >::iterator |
Definition at line 222 of file int_vector.hpp.
typedef int_vector_reference<int_vector>* sdsl::int_vector< t_width >::pointer |
Definition at line 226 of file int_vector.hpp.
typedef rank_support_v<0, 1> sdsl::int_vector< t_width >::rank_0_type |
Definition at line 232 of file int_vector.hpp.
typedef rank_support_v<1, 1> sdsl::int_vector< t_width >::rank_1_type |
Definition at line 231 of file int_vector.hpp.
typedef int_vector_trait<t_width>::reference sdsl::int_vector< t_width >::reference |
Definition at line 224 of file int_vector.hpp.
typedef select_support_mcl<0, 1> sdsl::int_vector< t_width >::select_0_type |
Definition at line 234 of file int_vector.hpp.
typedef select_support_mcl<1, 1> sdsl::int_vector< t_width >::select_1_type |
Definition at line 233 of file int_vector.hpp.
typedef int_vector_size_type sdsl::int_vector< t_width >::size_type |
Definition at line 229 of file int_vector.hpp.
typedef int_vector_trait<t_width>::value_type sdsl::int_vector< t_width >::value_type |
Definition at line 221 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 1425 of file int_vector.hpp.
|
inlineexplicit |
Constructor to fix possible comparison with integeres issue.
Definition at line 311 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 326 of file int_vector.hpp.
|
inline |
Move constructor.
Definition at line 1436 of file int_vector.hpp.
|
inline |
Copy constructor.
Definition at line 1448 of file int_vector.hpp.
sdsl::int_vector< t_width >::~int_vector |
Destructor.
Definition at line 1495 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 491 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 470 of file int_vector.hpp.
|
inline |
Assign. Resize int_vector and initialize with initializer_list.
il | Initializer_list. |
Definition at line 479 of file int_vector.hpp.
|
inline |
non const version of at() function
i | Index the i-th integer of length width(). |
Definition at line 665 of file int_vector.hpp.
|
inline |
const version of at() function
i | Index the i-th integer of length width(). |
Definition at line 671 of file int_vector.hpp.
|
inlinenoexcept |
Returns last element.
Definition at line 434 of file int_vector.hpp.
|
inlinenoexcept |
Returns last element.
Definition at line 431 of file int_vector.hpp.
|
inlinenoexcept |
Const iterator that points to the first element of the int_vector.
Definition at line 767 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 759 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 561 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 1508 of file int_vector.hpp.
|
inlinenoexcept |
The number of bits in the int_vector.
Definition at line 547 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 1598 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1605 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1612 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1619 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1626 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1633 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1640 of file int_vector.hpp.
|
inlinenoexcept |
Const iterator that points to the first element of the int_vector.
Definition at line 773 of file int_vector.hpp.
|
inlinenoexcept |
Const iterator that points to the element after the last element of int_vector.
Definition at line 776 of file int_vector.hpp.
|
inline |
Serialise (load) via cereal if archive is not binary.
Definition at line 1879 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 1853 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 339 of file int_vector.hpp.
|
inlinenoexcept |
Pointer to the raw data of the int_vector.
Definition at line 566 of file int_vector.hpp.
|
inlinenoexcept |
Pointer to the raw data of the int_vector.
Definition at line 571 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 370 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 440 of file int_vector.hpp.
|
inlinenoexcept |
Equivalent to size() == 0.
Definition at line 500 of file int_vector.hpp.
|
inlinenoexcept |
Const iterator that points to the element after the last element of int_vector.
Definition at line 770 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 764 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 356 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 344 of file int_vector.hpp.
|
inline |
Flip all bits of bit_vector.
Definition at line 779 of file int_vector.hpp.
|
inlinenoexcept |
Returns first element.
Definition at line 428 of file int_vector.hpp.
|
inlinenoexcept |
Returns first element.
Definition at line 425 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 1524 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 414 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 386 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 400 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 379 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 1831 of file int_vector.hpp.
|
inlinestaticnoexcept |
Maximum size of the int_vector.
Definition at line 542 of file int_vector.hpp.
|
inlinenoexcept |
Inequality operator for two int_vectors.
Two int_vectors are not equal if
Definition at line 721 of file int_vector.hpp.
int_vector< t_width > & sdsl::int_vector< t_width >::operator&= | ( | const int_vector< t_width > & | v | ) |
bitwise-and-update operator
Definition at line 1777 of file int_vector.hpp.
|
noexcept |
Less operator for two int_vectors.
int_vector w is less than v if
Definition at line 1735 of file int_vector.hpp.
|
noexcept |
Less or equal operator.
Definition at line 1765 of file int_vector.hpp.
int_vector< t_width > & sdsl::int_vector< t_width >::operator= | ( | const int_vector< t_width > & | v | ) |
Assignment operator.
v | The vector v which should be assigned |
Definition at line 1466 of file int_vector.hpp.
int_vector< t_width > & sdsl::int_vector< t_width >::operator= | ( | int_vector< t_width > && | v | ) |
Move assignment operator.
Definition at line 1477 of file int_vector.hpp.
|
inlinenoexcept |
Equality operator for two int_vectors.
Two int_vectors are equal if
Definition at line 686 of file int_vector.hpp.
|
noexcept |
Greater operator for two int_vectors.
int_vector w is greater than v if
Definition at line 1750 of file int_vector.hpp.
|
noexcept |
Greater of equal operator.
Definition at line 1771 of file int_vector.hpp.
|
inlinenoexcept |
const version of [] operator
i | Index the i-th integer of length width(). |
Definition at line 1686 of file int_vector.hpp.
|
inlinenoexcept |
non const version of [] operator
i | Index the i-th integer of length width(). |
Definition at line 1646 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1693 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1700 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1707 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1714 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1721 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1728 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1655 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1663 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1671 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1679 of file int_vector.hpp.
int_vector< t_width > & sdsl::int_vector< t_width >::operator^= | ( | const int_vector< t_width > & | v | ) |
bitwise-xor-update operator
Definition at line 1793 of file int_vector.hpp.
int_vector< t_width > & sdsl::int_vector< t_width >::operator|= | ( | const int_vector< t_width > & | v | ) |
bitwise-or-update equal operator
Definition at line 1785 of file int_vector.hpp.
|
inline |
Remove element at the end.
Definition at line 455 of file int_vector.hpp.
|
inline |
Insert element at the end.
value | Element to be inserted. |
Definition at line 448 of file int_vector.hpp.
|
inlinestatic |
Read the size and int_width of a int_vector.
Definition at line 789 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 511 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 521 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 527 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 1819 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 1537 of file int_vector.hpp.
|
inline |
Free unused allocated memory.
Definition at line 506 of file int_vector.hpp.
|
inlinenoexcept |
The number of elements in the int_vector.
Definition at line 1550 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1557 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1564 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1571 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1578 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1585 of file int_vector.hpp.
|
inlinenoexcept |
Definition at line 1592 of file int_vector.hpp.
|
inlinenoexcept |
Swap method for int_vector.
Definition at line 503 of file int_vector.hpp.
|
inlinenoexcept |
Returns the width of the integers which are accessed via the [] operator.
Definition at line 595 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 602 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 1801 of file int_vector.hpp.
|
inlinestatic |
Write the size and int_width of a int_vector.
Definition at line 806 of file int_vector.hpp.
Definition at line 250 of file int_vector.hpp.
Definition at line 244 of file int_vector.hpp.
Definition at line 246 of file int_vector.hpp.
Definition at line 248 of file int_vector.hpp.
|
friend |
Definition at line 235 of file int_vector.hpp.
|
friend |
Definition at line 235 of file int_vector.hpp.
|
friend |
Definition at line 235 of file int_vector.hpp.
|
friend |
Definition at line 242 of file int_vector.hpp.
|
friend |
Definition at line 235 of file int_vector.hpp.
|
friend |
Definition at line 251 of file int_vector.hpp.
|
friend |
Equality operator for an arbitrary container.
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 708 of file int_vector.hpp.
|
staticconstexpr |
Definition at line 252 of file int_vector.hpp.
float sdsl::int_vector< t_width >::growth_factor = 1.5 |
Growth factor for amortized constant time operations.
Definition at line 253 of file int_vector.hpp.
const raw_wrapper sdsl::int_vector< t_width >::raw = raw_wrapper(*this) |
Definition at line 837 of file int_vector.hpp.