SDSL 3.0.3
Succinct Data Structure Library
|
io.hpp contains some methods for reading/writing sdsl structures. More...
#include <algorithm>
#include <cctype>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <typeinfo>
#include <unordered_map>
#include <utility>
#include <vector>
#include <sdsl/bits.hpp>
#include <sdsl/config.hpp>
#include <sdsl/platform.hpp>
#include <sdsl/sdsl_concepts.hpp>
#include <sdsl/sfstream.hpp>
#include <sdsl/structure_tree.hpp>
#include <sdsl/util.hpp>
Go to the source code of this file.
Classes | |
struct | sdsl::has_serialize< X > |
struct | sdsl::has_load< X > |
struct | sdsl::nullstream |
struct | sdsl::nullstream::nullbuf |
struct | sdsl::default_sentinel< t_csx, t_alph > |
struct | sdsl::default_sentinel< t_csx, byte_alphabet_tag > |
struct | sdsl::default_sentinel< t_csx, int_alphabet_tag > |
Namespaces | |
namespace | sdsl |
Namespace for the succinct data structure library. |
Functions | |
int | sdsl::remove (std::string const &file) |
Remove a file. | |
template<typename T> | |
void | sdsl::load_vector (std::vector< T > &vec, std::istream &in) |
Load all elements of a vector from a input stream. | |
template<typename T> | |
uint64_t | sdsl::serialize_vector (std::vector< T > const &vec, std::ostream &out, sdsl::structure_tree_node *v, std::string name) |
Serialize each element of an std::vector. | |
template<typename T> | |
size_t | sdsl::write_member (T const &t, std::ostream &out, sdsl::structure_tree_node *v=nullptr, std::string name="") |
template<> | |
size_t | sdsl::write_member< std::string > (std::string const &t, std::ostream &out, sdsl::structure_tree_node *v, std::string name) |
template<typename T> | |
void | sdsl::read_member (T &t, std::istream &in) |
template<> | |
void | sdsl::read_member< std::string > (std::string &t, std::istream &in) |
template<typename X> | |
std::enable_if< has_serialize< X >::value, typenameX::size_type >::type | sdsl::serialize (X const &x, std::ostream &out, structure_tree_node *v=nullptr, std::string name="") |
template<typename X> | |
std::enable_if< std::is_standard_layout< X >::value &&std::is_trivial< X >::value, uint64_t >::type | sdsl::serialize (X const &x, std::ostream &out, structure_tree_node *v=nullptr, std::string name="") |
template<typename X> | |
uint64_t | sdsl::serialize (std::vector< X > const &x, std::ostream &out, structure_tree_node *v=nullptr, std::string name="") |
template<typename X> | |
std::enable_if< has_load< X >::value, void >::type | sdsl::load (X &x, std::istream &in) |
template<typename X> | |
std::enable_if< std::is_standard_layout< X >::value &&std::is_trivial< X >::value, void >::type | sdsl::load (X &x, std::istream &in) |
template<typename X> | |
void | sdsl::load (std::vector< X > &x, std::istream &in) |
template<typename T> | |
bool | sdsl::load_from_file (T &v, std::string const &file) |
Load sdsl-object v from a file. | |
template<typename t_int_vec> | |
bool | sdsl::load_vector_from_file (t_int_vec &v, std::string const &file, uint8_t num_bytes=1, uint8_t max_int_width=64) |
from disk. | |
template<typename T> | |
bool | sdsl::store_to_file (T const &v, std::string const &file) |
Store a data structure to a file. | |
bool | sdsl::store_to_file (char const *v, std::string const &file) |
Specialization of store_to_file for a char array. | |
template<uint8_t t_width> | |
bool | sdsl::store_to_file (int_vector< t_width > const &v, std::string const &file) |
Specialization of store_to_file for int_vector. | |
template<typename int_type, typename t_int_vec> | |
bool | sdsl::store_to_plain_array (t_int_vec &v, std::string const &file) |
Store an int_vector as plain int_type array to disk. | |
template<typename T> | |
size_t | sdsl::serialize_empty_object (std::ostream &, structure_tree_node *v=nullptr, std::string name="", T const *t=nullptr) |
template<typename T> | |
T::size_type | sdsl::size_in_bytes (T const &t) |
Get the size of a data structure in bytes. | |
template<typename T> | |
double | sdsl::size_in_mega_bytes (T const &t) |
Get the size of a data structure in mega bytes (MiB). | |
template<format_type F, typename X> | |
void | sdsl::write_structure (X const &x, std::ostream &out) |
template<format_type F, typename X> | |
void | sdsl::write_structure (X const &x, std::string file) |
template<format_type F, typename... Xs> | |
void | sdsl::write_structure (std::ostream &out, Xs... xs) |
template<typename X, typename... Xs> | |
void | sdsl::_write_structure (std::unique_ptr< structure_tree_node > &st_node, X x, Xs... xs) |
void | sdsl::_write_structure (std::unique_ptr< structure_tree_node > &) |
uint64_t | sdsl::_parse_number (std::string::const_iterator &c, std::string::const_iterator const &end) |
Internal function used by csXprintf. | |
template<typename t_csa> | |
t_csa const & | sdsl::_idx_csa (t_csa const &t, csa_tag) |
Internal function used by csXprintf. | |
template<typename t_cst> | |
const t_cst::csa_type & | sdsl::_idx_csa (t_cst const &t, cst_tag) |
Internal function used by csXprintf. | |
template<typename t_csa> | |
std::string | sdsl::_idx_lcp_val (t_csa const &, uint64_t, uint64_t, csa_tag) |
Internal function used by csXprintf. | |
template<typename t_cst> | |
std::string | sdsl::_idx_lcp_val (t_cst const &t, uint64_t i, uint64_t w, cst_tag) |
Internal function used by csXprintf. | |
template<typename t_idx> | |
void | sdsl::csXprintf (std::ostream &out, std::string const &format, t_idx const &idx, char sentinel=default_sentinel< t_idx >::value) |
Prints members of CSAs and CSTs. | |
std::string | sdsl::cache_file_name (std::string const &key, cache_config const &config) |
Returns the file name of the resource. | |
template<typename T> | |
std::string | sdsl::cache_file_name (std::string const &key, cache_config const &config) |
Returns the file name of the resource. | |
void | sdsl::register_cache_file (std::string const &key, cache_config &config) |
Register the existing resource specified by the key to the cache. | |
bool | sdsl::cache_file_exists (std::string const &key, cache_config const &config) |
Checks if the resource specified by the key exists in the cache. | |
template<typename T> | |
bool | sdsl::cache_file_exists (std::string const &key, cache_config const &config) |
Checks if the resource specified by the key and type exists in the cache. | |
std::string | sdsl::tmp_file (cache_config const &config, std::string name_part="") |
Returns a name for a temporary file. I.e. the name was not used before. | |
std::string | sdsl::tmp_file (std::string const &filename, std::string name_part="") |
Returns a name for a temporary file. I.e. the name was not used before. | |
template<typename T> | |
bool | sdsl::load_from_cache (T &v, std::string const &key, cache_config const &config, bool add_type_hash=false) |
template<typename T> | |
bool | sdsl::store_to_cache (T const &v, std::string const &key, cache_config &config, bool add_type_hash=false) |
Stores the object v as a resource in the cache. | |
template<typename T> | |
bool | sdsl::remove_from_cache (std::string const &key, cache_config &config, bool add_type_hash=false) |
template<typename T> | |
void | sdsl::add_hash (T const &t, std::ostream &out) |
template<typename T> | |
bool | sdsl::store_to_checked_file (T const &t, std::string const &file) |
bool | sdsl::store_to_checked_file (char const *v, std::string const &file) |
bool | sdsl::store_to_file (std::string const &v, std::string const &file) |
template<uint8_t t_width> | |
bool | sdsl::store_to_checked_file (int_vector< t_width > const &v, std::string const &file) |
template<typename T> | |
bool | sdsl::load_from_checked_file (T &v, std::string const &file) |
template<typename t_iv> | |
std::enable_if< std::is_same< typenamet_iv::index_category, iv_tag >::valueorstd::is_same< typenamet_iv::index_category, csa_tag >::valueorstd::is_same< typenamet_iv::index_category, lcp_tag >::value, std::ostream & >::type | sdsl::operator<< (std::ostream &os, t_iv const &v) |
template<typename t_iv> | |
std::enable_if< std::is_same< typenamet_iv::index_category, wt_tag >::value, std::ostream & >::type | sdsl::operator<< (std::ostream &os, t_iv const &v) |
template<typename t_int> | |
std::enable_if< std::is_integral< t_int >::value, std::ostream & >::type | sdsl::operator<< (std::ostream &os, std::vector< t_int > const &v) |
template<typename t_iv> | |
std::enable_if< std::is_same< typenamet_iv::category, csa_member_tag >::value, std::ostream & >::type | sdsl::operator<< (std::ostream &os, t_iv const &v) |