Skip to content

Commit

Permalink
[FIX] unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiler committed Jul 21, 2023
1 parent b28e265 commit 3d1f533
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 18 deletions.
3 changes: 1 addition & 2 deletions include/sdsl/bp_support_algorithm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,13 @@ inline bit_vector calculate_pioneers_bitmap_succinct(bit_vector const & bp, uint
bit_vector pioneer_bitmap(bp.size(), 0);

sorted_stack_support opening_parenthesis(bp.size());
uint64_t cur_pioneer_block = 0, last_start = 0, last_j = 0, cur_block = 0, first_index_in_block = 0;
uint64_t cur_pioneer_block = 0, last_start = 0, last_j = 0, first_index_in_block = 0;
// calculate positions of findclose and findopen pioneers
for (uint64_t j = 0, new_block = block_size; j < bp.size(); ++j, --new_block)
{
if (!(new_block))
{
cur_pioneer_block = j / block_size;
++cur_block;
first_index_in_block = j;
new_block = block_size;
}
Expand Down
6 changes: 0 additions & 6 deletions include/sdsl/construct_lcp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ inline void construct_lcp_go(cache_config & config)

int_vector<8> lcp_sml(n,
0); // initialize array for small values of first phase; note lcp[0]=0
size_type done_cnt = 0;

for (size_type i = 0; i < n; ++i)
{ // initialize cnt_c
Expand Down Expand Up @@ -436,7 +435,6 @@ inline void construct_lcp_go(cache_config & config)
#endif
}
lcp_sml[i] = l;
++done_cnt;
}
else
{ // BWT[i] != BWT[i-1] or LF[i] > i
Expand Down Expand Up @@ -482,7 +480,6 @@ inline void construct_lcp_go(cache_config & config)
rmq_end = j; // update index of the value of the topmost element
if (lf > i)
{ // if LF[i] > i, we can calculate LCP[LF[i]] in constant time with rmq
++done_cnt;
// rmq query for lcp-values in the interval I=[prev_occ_in_bwt[BWT[i]]+1..i]
// rmq is linear in the stack size; can also be implemented with binary search on the stack
size_type x_pos = prev_occ_in_bwt[bwti] + 2;
Expand Down Expand Up @@ -763,7 +760,6 @@ inline void construct_lcp_goPHI(cache_config & config)

int_vector<8> lcp_sml(n,
0); // initialize array for small values of first phase; note lcp[0]=0
size_type done_cnt = 0;

for (size_type i = 0; i < n; ++i)
{ // initialize cnt_c
Expand Down Expand Up @@ -817,7 +813,6 @@ inline void construct_lcp_goPHI(cache_config & config)
l += (text[sai_1 + m] == text[sai + m]);
}
lcp_sml[i] = l;
++done_cnt;
}
else
{ // BWT[i] != BWT[i-1] or LF[i] > i
Expand Down Expand Up @@ -845,7 +840,6 @@ inline void construct_lcp_goPHI(cache_config & config)
rmq_end = j; // update index of the value of the topmost element
if (lf > i)
{ // if LF[i] > i, we can calculate LCP[LF[i]] in constant time with rmq
++done_cnt;
// rmq query for lcp-values in the interval I=[prev_occ_in_bwt[BWT[i]]+1..i]
// rmq is linear in the stack size; can also be implemented with binary search on the stack
size_type x_pos = prev_occ_in_bwt[bwti] + 2;
Expand Down
2 changes: 0 additions & 2 deletions include/sdsl/csa_sampling_strategy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ class _fuzzy_sa_sampling
bit_vector marked_sa(n, 0); // temporary bitvector for marked SA positions
int_vector<> inv_perm((n + sample_dens - 1) / sample_dens, 0, bits::hi(n) + 1);
size_type cnt = 0;
size_type runs = 1;

uint64_t min_prev_val = 0;
for (size_type i = 0; i < n; i += sample_dens)
Expand All @@ -371,7 +370,6 @@ class _fuzzy_sa_sampling
if (pos_cnd == n)
{ // increasing sequence can not be extended
pos_cnd = pos_min;
++runs;
}
min_prev_val = isa_buf[pos_cnd];
marked_isa[pos_cnd] = 1;
Expand Down
6 changes: 0 additions & 6 deletions include/sdsl/lcp_support_tree2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,7 @@ void construct_first_child_and_lf_lcp(int_vector_buffer<> & lcp_buf,

osfstream big_lcp_out(big_lcp_file, std::ios::out | std::ios::trunc | std::ios::binary);

size_type fc_cnt = 0; // number of lcp values at the first child r
size_type fc_cnt_big = 0; // number of lcp values at the first child which are big and not reducible
size_type fc_cnt_big2 = 0;
sorted_multi_stack_support vec_stack(n); // occupies 2n bits
bit_vector is_big_and_not_reducable(n, 0); // initialized with 0s
bool is_one_big_and_not_reducable = false; // all positions have to be reducible
Expand Down Expand Up @@ -286,15 +284,13 @@ void construct_first_child_and_lf_lcp(int_vector_buffer<> & lcp_buf,
else
{
val = M - 1;
++fc_cnt_big2;
}
}
else
{
val = y;
}
sml_lcp_out.push_back(val);
++fc_cnt;
is_one_big_and_not_reducable = false;
}
}
Expand Down Expand Up @@ -328,15 +324,13 @@ void construct_first_child_and_lf_lcp(int_vector_buffer<> & lcp_buf,
else
{
val = M - 1;
++fc_cnt_big2;
}
}
else
{
val = y;
}
sml_lcp_out.push_back(val);
++fc_cnt;
}
}

Expand Down
2 changes: 0 additions & 2 deletions include/sdsl/wt_hutu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -648,13 +648,11 @@ struct _hutu_shape

int64_t spointer = -1;
uint64_t qpointer = 0; // use the Array T as a stack
int64_t max_nodes = sigma;
while (qpointer < sigma or spointer >= 1LL)
{
if (spointer >= 1LL and (stack[spointer]->level == stack[spointer - 1]->level))
{
ht_node * n_node = new ht_node();
max_nodes++;
n_node->t = false;
n_node->left = stack[spointer - 1];
n_node->right = stack[spointer];
Expand Down

0 comments on commit 3d1f533

Please sign in to comment.