SDSL 3.0.3
Succinct Data Structure Library
|
util.hpp contains some helper methods for int_vector and other stuff like demangle class names. More...
#include <algorithm>
#include <cassert>
#include <chrono>
#include <cstdlib>
#include <errno.h>
#include <iomanip>
#include <map>
#include <numeric>
#include <random>
#include <sstream>
#include <stdexcept>
#include <stdint.h>
#include <string.h>
#include <string>
#include <type_traits>
#include <typeinfo>
#include <utility>
#include <sdsl/bits.hpp>
#include <sdsl/config.hpp>
#include <sdsl/ram_fs.hpp>
#include <sys/stat.h>
#include <vector>
#include <cxxabi.h>
#include <libgen.h>
#include <unistd.h>
Go to the source code of this file.
Namespaces | |
namespace | sdsl |
Namespace for the succinct data structure library. | |
namespace | sdsl::util |
A namespace for helper functions. | |
Macros | |
#define | SDSL_STR(x) |
#define | SDSL_XSTR(s) |
Functions | |
void | sdsl::util::set_verbose () |
template<class t_int_vec> | |
void | sdsl::util::set_random_bits (t_int_vec &v, int seed=0) |
Sets all bits of the int_vector to pseudo-random bits. | |
template<class t_int_vec> | |
void | sdsl::util::_set_zero_bits (t_int_vec &v) |
Sets all bits of the int_vector to 0-bits. | |
template<class t_int_vec> | |
void | sdsl::util::_set_one_bits (t_int_vec &v) |
Sets all bits of the int_vector to 1-bits. | |
template<class t_int_vec> | |
void | sdsl::util::bit_compress (t_int_vec &v) |
Bit compress the int_vector. | |
template<class t_int_vec> | |
void | sdsl::util::expand_width (t_int_vec &v, uint8_t new_width) |
Expands the integer width to new_width >= v.width() | |
template<class t_int_vec> | |
void | sdsl::util::mod (t_int_vec &v, typename t_int_vec::size_type m) |
All elements of v modulo m. | |
void | sdsl::util::cyclic_shifts (uint64_t *vec, uint8_t &n, uint64_t k, uint8_t int_width) |
template<class t_int_vec> | |
void | sdsl::util::set_to_value (t_int_vec &v, uint64_t k) |
Set all entries of int_vector to value k. | |
template<class t_int_vec, class t_int_vec_iterator> | |
void | sdsl::util::set_to_value (t_int_vec &v, uint64_t k, t_int_vec_iterator it) |
Set all entries of int_vector starting from iterator it to value k. | |
template<class t_int_vec> | |
void | sdsl::util::set_to_id (t_int_vec &v) |
Sets each entry of the numerical vector v at position $fi . | |
template<class t_int_vec> | |
Number of set bits in v t_int_vec::size_type | sdsl::util::cnt_one_bits (t_int_vec const &v) |
template<class t_int_vec> | |
Number of occurrences of bit pattern in v t_int_vec::size_type | sdsl::util::cnt_onezero_bits (t_int_vec const &v) |
template<class t_int_vec> | |
Number of occurrences of bit pattern in v t_int_vec::size_type | sdsl::util::cnt_zeroone_bits (t_int_vec const &v) |
template<class t_int_vec> | |
Get the smallest position f$i geq idx f$ where a bit is set t_int_vec::size_type | sdsl::util::next_bit (t_int_vec const &v, uint64_t idx) |
template<class t_int_vec> | |
Get the greatest position f$i leq idx f$ where a bit is set t_int_vec::size_type | sdsl::util::prev_bit (t_int_vec const &v, uint64_t idx) |
Get the size of a file in bytes size_t | sdsl::util::file_size (std::string const &file) |
Returns the basename of a file std::string | sdsl::util::basename (std::string file) |
Returns the directory of a file A trailing will be removed std::string | sdsl::util::dirname (std::string file) |
Demangle the class name of | sdsl::util::typeid (...).name() inline std |
util.hpp contains some helper methods for int_vector and other stuff like demangle class names.
Definition in file util.hpp.
#define SDSL_XSTR | ( | s | ) |