Skip to content

Commit

Permalink
remove tag output
Browse files Browse the repository at this point in the history
  • Loading branch information
oma219 committed May 30, 2024
1 parent 84f1fe5 commit 578b4a3
Showing 1 changed file with 0 additions and 64 deletions.
64 changes: 0 additions & 64 deletions include/pfp_lcp_doc_two_pass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,6 @@ class pfp_lcp_doc_two_pass {
dirty_lcp_cache[i] = max_lcp_init;
// DEBUG: END ---------------------------------------------


// TAG: START ---------------------------------------------
size_t num_tag_runs = 1;
size_t curr_tag_doc = 0;
size_t num_checks = 0;
std::vector<size_t> sa_samples_for_tag;
size_t prev_sa_sample = 0;
size_t shared_boundary = 1;
std::set<size_t> set_of_tag_samples;
// TAG: END -----------------------------------------------

// create a struct to store data for temp file
temp_data_entry_t curr_data_entry;

Expand Down Expand Up @@ -216,40 +205,6 @@ class pfp_lcp_doc_two_pass {
bool is_start = (pos == 0 || curr_bwt_ch != prev_bwt_ch) ? 1 : 0;
bool is_end = (pos == ref_build->total_length-1); // only special case, common case is below

// DEBUG -----------------------------
if (pos > 0) {
num_checks++;
bool tag_run_boundary = false;
bool bwt_run_boundary = false;

// check for start of tag array run
if (doc_i != curr_tag_doc) {
num_tag_runs++;
curr_tag_doc = doc_i;
tag_run_boundary = true;
}

// check for start of bwt run
if (is_start) {
bwt_run_boundary = true;
}

// check if they both occur with each other
if (bwt_run_boundary && tag_run_boundary) {shared_boundary++;}

// check if either occurs and store the two sa values
if (bwt_run_boundary || tag_run_boundary) {
sa_samples_for_tag.push_back(sa_i);
sa_samples_for_tag.push_back(prev_sa_sample);
}
} else if (pos == 0) {
curr_tag_doc = doc_i;
sa_samples_for_tag.push_back(sa_i);
}
prev_sa_sample = sa_i;
// DEBUG -----------------------------


// handle scenario where the previous suffix was a end of a run
if (pos > 0 && prev_bwt_ch != curr_bwt_ch)
curr_data_entry.is_end = true;
Expand Down Expand Up @@ -313,25 +268,6 @@ class pfp_lcp_doc_two_pass {
}
DONE_LOG((std::chrono::system_clock::now() - start));

// DEBUG -----------------------------
std::cout << "\n\nDEBUG --------------------------------- \n\n";
sa_samples_for_tag.push_back(prev_sa_sample);

// print number fo tag runs and number of shared boundaries
std::cout << "num_tag_runs (t) = " << num_tag_runs << std::endl;
std::cout << "num_checks = " << num_checks << "\n\n";

std::cout << "shared_boundary = " << shared_boundary << "\n\n";

// build set and print size
for (auto x: sa_samples_for_tag) {set_of_tag_samples.insert(x);}

std::cout << "size of sa array = " << sa_samples_for_tag.size() << std::endl;
std::cout << "size of sa array set = " << set_of_tag_samples.size() << "\n\n";

std::cout << "\n\nDEBUG --------------------------------- \n\n";
// DEBUG -----------------------------

// make sure to write the last suffix to temp data
write_data_to_temp_file(curr_data_entry);
if (curr_data_entry.is_start || curr_data_entry.is_end)
Expand Down

0 comments on commit 578b4a3

Please sign in to comment.