tudocomp
– The TU Dortmund Compression Framework
EspContext.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
tudocomp/util/View.hpp
>
4
#include <
tudocomp/compressors/esp/SLP.hpp
>
5
#include <
tudocomp/compressors/esp/Rounds.hpp
>
6
#include <
tudocomp/compressors/esp/utils.hpp
>
7
#include <
tudocomp/compressors/esp/DebugContext.hpp
>
8
9
namespace
tdc
{
namespace
esp {
10
template
<
typename
ipd_t>
11
class
EspContext
{
12
const
Env
* m_env;
13
public
:
14
using
esp_view_t
=
ConstGenericView<size_t>
;
15
16
template
<
typename
F>
17
auto
with_env
(F f) -> decltype(f(*m_env)) {
18
if
(m_env !=
nullptr
) {
19
return
f(*m_env);
20
}
21
return
decltype(f(*m_env))();
22
}
23
24
DebugContext
debug
;
25
IPDStats
ipd_stats
;
26
27
EspContext
(
const
Env
* e,
bool
silent):
28
m_env(e),
29
debug(
std
::cout, !silent, false)
30
{}
31
32
bool
behavior_metablocks_maximimze_repeating
=
true
;
33
bool
behavior_landmarks_tie_to_right
=
true
;
34
bool
behavior_iter_log_mode
=
false
;
// UNUSED
35
36
template
<
typename
T>
37
SLP
generate_grammar
(T&& s);
38
};
39
}}
tdc
Contains the text compression and encoding framework.
Definition:
namespaces.hpp:11
tdc::esp::EspContext::debug
DebugContext debug
Definition:
EspContext.hpp:24
tdc::esp::EspContext::EspContext
EspContext(const Env *e, bool silent)
Definition:
EspContext.hpp:27
tdc::esp::EspContext::with_env
auto with_env(F f) -> decltype(f(*m_env))
Definition:
EspContext.hpp:17
tdc::ConstGenericView
A const view into a slice of memory.
Definition:
GenericConstView.hpp:33
tdc::esp::IPDStats
Definition:
GrammarRules.hpp:6
tdc::esp::EspContext
Definition:
EspContext.hpp:11
View.hpp
std
Definition:
HashArray.hpp:42
utils.hpp
tdc::esp::SLP
Definition:
SLP.hpp:12
SLP.hpp
tdc::esp::EspContext::behavior_metablocks_maximimze_repeating
bool behavior_metablocks_maximimze_repeating
Definition:
EspContext.hpp:32
DebugContext.hpp
tdc::esp::EspContext::behavior_iter_log_mode
bool behavior_iter_log_mode
Definition:
EspContext.hpp:34
tdc::esp::EspContext::generate_grammar
SLP generate_grammar(T &&s)
Definition:
EspContextImpl.hpp:14
tdc::Env
Local environment for a compression/encoding/decompression call.
Definition:
pre_header/Env.hpp:55
Rounds.hpp
tdc::esp::DebugContext
Definition:
DebugContext.hpp:339
tdc::esp::EspContext::behavior_landmarks_tie_to_right
bool behavior_landmarks_tie_to_right
Definition:
EspContext.hpp:33
tdc::esp::EspContext::ipd_stats
IPDStats ipd_stats
Definition:
EspContext.hpp:25
include
tudocomp
compressors
esp
EspContext.hpp
Generated by
1.8.13