/usr/include/sdsl/lcp.hpp is in libsdsl-dev 2.0.3-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | /* sdsl - succinct data structures library
Copyright (C) 2009 Simon Gog
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/ .
*/
/*! \file lcp.hpp
\brief lcp.hpp contains classes for lcp information.
\author Simon Gog
*/
#ifndef INCLUDED_SDSL_LCP
#define INCLUDED_SDSL_LCP
#include "sdsl_concepts.hpp"
#include "int_vector.hpp"
#include "csa_alphabet_strategy.hpp" // for key_trait
#include "select_support_mcl.hpp"
#include "construct_isa.hpp"
#include <istream>
//! Namespace for the succinct data structure library.
namespace sdsl
{
// construct lcp arrays
template<class t_lcp, class t_cst>
void construct_lcp(t_lcp& lcp, const t_cst& cst, cache_config& config)
{
typename t_lcp::lcp_category tag;
construct_lcp(lcp, cst, config, tag);
}
template<class t_lcp, class t_cst>
void construct_lcp(t_lcp& lcp, const t_cst&, cache_config& config, lcp_plain_tag)
{
t_lcp tmp_lcp(config);
lcp.swap(tmp_lcp);
}
template<class t_lcp, class t_cst>
void construct_lcp(t_lcp& lcp, const t_cst& cst, cache_config& config, lcp_permuted_tag)
{
t_lcp tmp_lcp(config, &(cst.csa));
lcp.swap(tmp_lcp);
}
template<class t_lcp, class t_cst>
void construct_lcp(t_lcp& lcp, const t_cst& cst, cache_config& config, lcp_tree_compressed_tag)
{
t_lcp tmp_lcp(config, &cst);
lcp.swap(tmp_lcp);
}
template<class t_lcp, class t_cst>
void construct_lcp(t_lcp& lcp, const t_cst& cst, cache_config& config, lcp_tree_and_lf_compressed_tag)
{
t_lcp tmp_lcp(config, &cst);
lcp.swap(tmp_lcp);
}
// copy lcp arrays
template<class t_lcp, class t_cst>
void copy_lcp(t_lcp& lcp, const t_lcp& lcp_c, const t_cst& cst)
{
typename t_lcp::lcp_category tag;
copy_lcp(lcp, lcp_c, cst, tag);
}
template<class t_lcp, class t_cst>
void copy_lcp(t_lcp& lcp, const t_lcp& lcp_c, const t_cst&, lcp_plain_tag)
{
lcp = lcp_c;
}
template<class t_lcp, class t_cst>
void copy_lcp(t_lcp& lcp, const t_lcp& lcp_c, const t_cst& cst, lcp_permuted_tag)
{
lcp = lcp_c;
lcp.set_csa(&(cst.csa));
}
template<class t_lcp, class t_cst>
void copy_lcp(t_lcp& lcp, const t_lcp& lcp_c, const t_cst& cst, lcp_tree_compressed_tag)
{
lcp = lcp_c;
lcp.set_cst(&cst);
}
template<class t_lcp, class t_cst>
void copy_lcp(t_lcp& lcp, const t_lcp& lcp_c, const t_cst& cst, lcp_tree_and_lf_compressed_tag)
{
lcp = lcp_c;
lcp.set_cst(&cst);
}
// move lcp arrays
template<class t_lcp, class t_cst>
void move_lcp(t_lcp& lcp, t_lcp& lcp_c, const t_cst& cst)
{
typename t_lcp::lcp_category tag;
move_lcp(lcp, lcp_c, cst, tag);
}
template<class t_lcp, class t_cst>
void move_lcp(t_lcp& lcp, t_lcp& lcp_c, const t_cst&, lcp_plain_tag)
{
lcp = std::move(lcp_c);
}
template<class t_lcp, class t_cst>
void move_lcp(t_lcp& lcp, t_lcp& lcp_c, const t_cst& cst, lcp_permuted_tag)
{
lcp = std::move(lcp_c);
lcp.set_csa(&(cst.csa));
}
template<class t_lcp, class t_cst>
void move_lcp(t_lcp& lcp, t_lcp& lcp_c, const t_cst& cst, lcp_tree_compressed_tag)
{
lcp = std::move(lcp_c);
lcp.set_cst(&cst);
}
template<class t_lcp, class t_cst>
void move_lcp(t_lcp& lcp, t_lcp& lcp_c, const t_cst& cst, lcp_tree_and_lf_compressed_tag)
{
lcp = std::move(lcp_c);
lcp.set_cst(&cst);
}
// swap lcp arrays
template<class t_lcp, class t_cst>
void swap_lcp(t_lcp& lcp1, t_lcp& lcp2, const t_cst& cst1, const t_cst& cst2)
{
typename t_lcp::lcp_category tag;
swap_lcp(lcp1, lcp2, cst1, cst2, tag);
}
template<class t_lcp, class t_cst>
void swap_lcp(t_lcp& lcp1, t_lcp& lcp2, const t_cst&, const t_cst&, lcp_plain_tag)
{
lcp1.swap(lcp2);
}
template<class t_lcp, class t_cst>
void swap_lcp(t_lcp& lcp1, t_lcp& lcp2, const t_cst& cst1, const t_cst& cst2, lcp_permuted_tag)
{
lcp1.swap(lcp2);
lcp1.set_csa(&(cst1.csa));
lcp2.set_csa(&(cst2.csa));
}
template<class t_lcp, class t_cst>
void swap_lcp(t_lcp& lcp1, t_lcp& lcp2, const t_cst& cst1, const t_cst& cst2, lcp_tree_compressed_tag)
{
lcp1.swap(lcp2);
lcp1.set_cst(&cst1);
lcp2.set_cst(&cst2);
}
template<class t_lcp, class t_cst>
void swap_lcp(t_lcp& lcp1, t_lcp& lcp2, const t_cst& cst1, const t_cst& cst2, lcp_tree_and_lf_compressed_tag)
{
lcp1.swap(lcp2);
lcp1.set_cst(&cst1);
lcp2.set_cst(&cst2);
}
// load lcp arrays
template<class t_lcp, class t_cst>
void load_lcp(t_lcp& lcp, std::istream& in, const t_cst& cst)
{
typename t_lcp::lcp_category tag;
load_lcp(lcp, in, cst, tag);
}
template<class t_lcp, class t_cst>
void load_lcp(t_lcp& lcp, std::istream& in, const t_cst&, lcp_plain_tag)
{
lcp.load(in);
}
template<class t_lcp, class t_cst>
void load_lcp(t_lcp& lcp, std::istream& in, const t_cst& cst, lcp_permuted_tag)
{
lcp.load(in, &(cst.csa));
}
template<class t_lcp, class t_cst>
void load_lcp(t_lcp& lcp, std::istream& in, const t_cst& cst, lcp_tree_compressed_tag)
{
lcp.load(in, &cst);
}
template<class t_lcp, class t_cst>
void load_lcp(t_lcp& lcp, std::istream& in, const t_cst& cst, lcp_tree_and_lf_compressed_tag)
{
lcp.load(in, &cst);
}
} // end namespace sdsl
#include "lcp_support_sada.hpp" // type (b)
#include "lcp_byte.hpp" // type (a)
#include "lcp_wt.hpp" // type (a)
#include "lcp_vlc.hpp" // type (a)
#include "lcp_dac.hpp" // type (a)
#include "lcp_bitcompressed.hpp" // type (a)
#include "lcp_support_tree.hpp" // type (c)
#include "lcp_support_tree2.hpp" // type (c)
#endif
|