├── ._to_be_removed_travis.yml ├── .github └── workflows │ ├── cibuildwheel.yml │ └── ubuntu.yml ├── .gitignore ├── .gitmodules ├── .readthedocs.yml ├── CMakeLists.txt ├── Doxyfile ├── LICENSE ├── MANIFEST.in ├── README.md ├── README.rst ├── ThirdParty ├── CLI │ └── CLI11.hpp ├── TBB │ ├── bin │ │ ├── tbbvars.csh │ │ └── tbbvars.sh │ ├── include │ │ ├── index.html │ │ ├── serial │ │ │ └── tbb │ │ │ │ ├── parallel_for.h │ │ │ │ └── tbb_annotate.h │ │ └── tbb │ │ │ ├── aggregator.h │ │ │ ├── aligned_space.h │ │ │ ├── atomic.h │ │ │ ├── blocked_range.h │ │ │ ├── blocked_range2d.h │ │ │ ├── blocked_range3d.h │ │ │ ├── blocked_rangeNd.h │ │ │ ├── cache_aligned_allocator.h │ │ │ ├── combinable.h │ │ │ ├── compat │ │ │ ├── condition_variable │ │ │ ├── ppl.h │ │ │ ├── thread │ │ │ └── tuple │ │ │ ├── concurrent_hash_map.h │ │ │ ├── concurrent_lru_cache.h │ │ │ ├── concurrent_priority_queue.h │ │ │ ├── concurrent_queue.h │ │ │ ├── concurrent_unordered_map.h │ │ │ ├── concurrent_unordered_set.h │ │ │ ├── concurrent_vector.h │ │ │ ├── critical_section.h │ │ │ ├── enumerable_thread_specific.h │ │ │ ├── flow_graph.h │ │ │ ├── flow_graph_abstractions.h │ │ │ ├── flow_graph_opencl_node.h │ │ │ ├── gfx_factory.h │ │ │ ├── global_control.h │ │ │ ├── index.html │ │ │ ├── internal │ │ │ ├── _aggregator_impl.h │ │ │ ├── _concurrent_queue_impl.h │ │ │ ├── _concurrent_unordered_impl.h │ │ │ ├── _flow_graph_async_msg_impl.h │ │ │ ├── _flow_graph_body_impl.h │ │ │ ├── _flow_graph_cache_impl.h │ │ │ ├── _flow_graph_impl.h │ │ │ ├── _flow_graph_indexer_impl.h │ │ │ ├── _flow_graph_item_buffer_impl.h │ │ │ ├── _flow_graph_join_impl.h │ │ │ ├── _flow_graph_node_impl.h │ │ │ ├── _flow_graph_streaming_node.h │ │ │ ├── _flow_graph_tagged_buffer_impl.h │ │ │ ├── _flow_graph_trace_impl.h │ │ │ ├── _flow_graph_types_impl.h │ │ │ ├── _mutex_padding.h │ │ │ ├── _range_iterator.h │ │ │ ├── _tbb_hash_compare_impl.h │ │ │ ├── _tbb_strings.h │ │ │ ├── _tbb_trace_impl.h │ │ │ ├── _tbb_windef.h │ │ │ ├── _template_helpers.h │ │ │ ├── _x86_eliding_mutex_impl.h │ │ │ └── _x86_rtm_rw_mutex_impl.h │ │ │ ├── machine │ │ │ ├── gcc_arm.h │ │ │ ├── gcc_generic.h │ │ │ ├── gcc_ia32_common.h │ │ │ ├── gcc_itsx.h │ │ │ ├── ibm_aix51.h │ │ │ ├── icc_generic.h │ │ │ ├── linux_common.h │ │ │ ├── linux_ia32.h │ │ │ ├── linux_ia64.h │ │ │ ├── linux_intel64.h │ │ │ ├── mac_ppc.h │ │ │ ├── macos_common.h │ │ │ ├── mic_common.h │ │ │ ├── msvc_armv7.h │ │ │ ├── msvc_ia32_common.h │ │ │ ├── sunos_sparc.h │ │ │ ├── windows_api.h │ │ │ ├── windows_ia32.h │ │ │ └── windows_intel64.h │ │ │ ├── memory_pool.h │ │ │ ├── mutex.h │ │ │ ├── null_mutex.h │ │ │ ├── null_rw_mutex.h │ │ │ ├── parallel_do.h │ │ │ ├── parallel_for.h │ │ │ ├── parallel_for_each.h │ │ │ ├── parallel_invoke.h │ │ │ ├── parallel_reduce.h │ │ │ ├── parallel_scan.h │ │ │ ├── parallel_sort.h │ │ │ ├── parallel_while.h │ │ │ ├── partitioner.h │ │ │ ├── pipeline.h │ │ │ ├── queuing_mutex.h │ │ │ ├── queuing_rw_mutex.h │ │ │ ├── reader_writer_lock.h │ │ │ ├── recursive_mutex.h │ │ │ ├── runtime_loader.h │ │ │ ├── scalable_allocator.h │ │ │ ├── spin_mutex.h │ │ │ ├── spin_rw_mutex.h │ │ │ ├── task.h │ │ │ ├── task_arena.h │ │ │ ├── task_group.h │ │ │ ├── task_scheduler_init.h │ │ │ ├── task_scheduler_observer.h │ │ │ ├── tbb.h │ │ │ ├── tbb_allocator.h │ │ │ ├── tbb_config.h │ │ │ ├── tbb_disable_exceptions.h │ │ │ ├── tbb_exception.h │ │ │ ├── tbb_machine.h │ │ │ ├── tbb_profiling.h │ │ │ ├── tbb_stddef.h │ │ │ ├── tbb_thread.h │ │ │ ├── tbbmalloc_proxy.h │ │ │ └── tick_count.h │ └── lib │ │ └── intel64 │ │ └── gcc4.7 │ │ ├── libtbb.so │ │ ├── libtbb.so.2 │ │ ├── libtbb_debug.so │ │ ├── libtbb_debug.so.2 │ │ ├── libtbb_preview.so │ │ ├── libtbb_preview.so.2 │ │ ├── libtbb_preview_debug.so │ │ ├── libtbb_preview_debug.so.2 │ │ ├── libtbbmalloc.so │ │ ├── libtbbmalloc.so.2 │ │ ├── libtbbmalloc_debug.so │ │ ├── libtbbmalloc_debug.so.2 │ │ ├── libtbbmalloc_proxy.so │ │ ├── libtbbmalloc_proxy.so.2 │ │ ├── libtbbmalloc_proxy_debug.so │ │ └── libtbbmalloc_proxy_debug.so.2 ├── catch.hpp ├── json │ └── json.hpp ├── ntCard │ ├── .gitignore │ ├── CITATION.bib │ ├── ChangeLog │ ├── Common │ │ ├── Fcontrol.cpp │ │ ├── Fcontrol.h │ │ ├── SignalHandler.cpp │ │ ├── SignalHandler.h │ │ ├── StringUtil.h │ │ ├── Uncompress.cpp │ │ ├── Uncompress.h │ │ ├── ntHashIterator.hpp │ │ └── nthash.hpp │ ├── LICENSE │ ├── Makefile.am │ ├── README.md │ ├── autogen.sh │ ├── configure.ac │ ├── include │ │ └── ntcard.hpp │ ├── libntcard.cpp │ └── nthll.cpp └── sdsl-lite │ ├── .gitignore │ ├── .gitmodules │ ├── .travis.yml │ ├── CMakeLists.txt │ ├── CMakeModules │ ├── AppendCompilerFlags.cmake │ ├── CheckSSE4_2.cmake │ ├── FindCxaDemangle.cmake │ ├── check_mode_ti.cpp │ └── cmake_uninstall.cmake.in │ ├── COPYING │ ├── Make.helper.cmake │ ├── README.md │ ├── VERSION │ ├── benchmark │ ├── Make.download │ ├── README.md │ ├── basic_functions.R │ ├── data │ │ └── .gitignore │ ├── document_retrieval │ │ ├── Makefile │ │ ├── README.md │ │ ├── bin │ │ │ └── .gitignore │ │ ├── dic.config │ │ ├── dic │ │ │ └── .gitignore │ │ ├── index.config │ │ ├── index_int.config │ │ ├── indexes │ │ │ └── .gitignore │ │ ├── info │ │ │ └── .gitignore │ │ ├── pattern │ │ │ └── .gitignore │ │ ├── pattern_length.config │ │ ├── pattern_length_int.config │ │ ├── results │ │ │ └── .gitignore │ │ ├── src │ │ │ ├── build_idx.cpp │ │ │ ├── doc_list_index.hpp │ │ │ ├── doc_list_index_greedy.hpp │ │ │ ├── doc_list_index_qprobing.hpp │ │ │ ├── doc_list_index_sada.hpp │ │ │ ├── doc_list_index_sort.hpp │ │ │ ├── gen_pattern.cpp │ │ │ ├── query_idx.cpp │ │ │ ├── size_of_idx.cpp │ │ │ └── word_pat2char_pat.cpp │ │ ├── test_case.config │ │ ├── test_case_int.config │ │ └── visualize │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── doc_re_time.tex │ │ │ ├── index-filter.config │ │ │ ├── index-filter_int.config │ │ │ └── runtime.R │ ├── indexing_count │ │ ├── Makefile │ │ ├── README.md │ │ ├── bin │ │ │ └── .gitignore │ │ ├── compile_options.config │ │ ├── index.config │ │ ├── indexes │ │ │ └── .gitignore │ │ ├── info │ │ │ └── .gitignore │ │ ├── pattern │ │ │ └── .gitignore │ │ ├── results │ │ │ └── .gitignore │ │ ├── src │ │ │ ├── build_index_sdsl.cpp │ │ │ ├── genpatterns.c │ │ │ ├── info.cpp │ │ │ ├── interface.h │ │ │ └── run_queries_sdsl.cpp │ │ ├── test_case.config │ │ └── visualize │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── count-footer.tex │ │ │ ├── count-header.tex │ │ │ ├── count.R │ │ │ └── index-filter.config │ ├── indexing_extract │ │ ├── Makefile │ │ ├── README.md │ │ ├── bin │ │ │ └── .gitignore │ │ ├── index.config │ │ ├── indexes │ │ │ └── .gitignore │ │ ├── info │ │ │ └── .gitignore │ │ ├── intervals │ │ │ └── .gitignore │ │ ├── results │ │ │ └── .gitignore │ │ ├── sample.config │ │ ├── src │ │ │ ├── build_index_sdsl.cpp │ │ │ ├── genintervals.c │ │ │ ├── info.cpp │ │ │ ├── interface.h │ │ │ └── run_queries_sdsl.cpp │ │ ├── test_case.config │ │ └── visualize │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── extract.R │ │ │ ├── extract.tex │ │ │ └── index-filter.config │ ├── indexing_locate │ │ ├── Makefile │ │ ├── README.md │ │ ├── bin │ │ │ └── .gitignore │ │ ├── index.config │ │ ├── indexes │ │ │ └── .gitignore │ │ ├── info │ │ │ └── .gitignore │ │ ├── pattern │ │ │ └── .gitignore │ │ ├── results │ │ │ └── .gitignore │ │ ├── sample.config │ │ ├── src │ │ │ ├── build_index_sdsl.cpp │ │ │ ├── info.cpp │ │ │ ├── interface.h │ │ │ ├── pattern_random.cpp │ │ │ └── run_queries_sdsl.cpp │ │ ├── test_case.config │ │ └── visualize │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── index-filter.config │ │ │ ├── locate.R │ │ │ └── locate.tex │ ├── k2_trees │ │ ├── Makefile │ │ ├── README.md │ │ ├── bin │ │ │ └── .gitignore │ │ ├── compile_options.config │ │ ├── k2tree.config │ │ ├── results │ │ │ └── .gitignore │ │ ├── src │ │ │ ├── gen_k2t.cpp │ │ │ └── k2_time_and_space.cpp │ │ ├── test_case.config │ │ └── visualize │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── k2-footer.tex │ │ │ ├── k2-header.tex │ │ │ └── k2.R │ ├── lcp │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── README.md │ │ ├── bin │ │ │ └── .gitignore │ │ ├── compile_options.config │ │ ├── lcp.config │ │ ├── results │ │ │ └── .gitignore │ │ ├── src │ │ │ ├── .gitignore │ │ │ ├── create_lcp.cpp │ │ │ └── create_sa_bwt.cpp │ │ ├── test_case.config │ │ └── visualize │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── lcp-footer.tex │ │ │ ├── lcp-header.tex │ │ │ └── lcp.R │ ├── rrr_vector │ │ ├── Makefile │ │ ├── README.md │ │ ├── bin │ │ │ └── .gitignore │ │ ├── block_size.config │ │ ├── compile_options.config │ │ ├── results │ │ │ └── .gitignore │ │ ├── src │ │ │ ├── generate_rnd_bitvector.cpp │ │ │ └── rrr_time_and_space.cpp │ │ ├── test_case.config │ │ └── visualize │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── rrr-footer.tex │ │ │ ├── rrr-header.tex │ │ │ └── rrr.R │ ├── self_delimiting_codes │ │ ├── Makefile │ │ ├── README.md │ │ ├── bin │ │ │ └── .gitignore │ │ ├── compile_options.config │ │ ├── results │ │ │ └── .gitignore │ │ ├── src │ │ │ └── sdc_benchmark.cpp │ │ ├── test_case.config │ │ ├── vectors.config │ │ └── visualize │ │ │ ├── Makefile │ │ │ ├── self_delimiting_codes.tex │ │ │ └── testcase.tex │ ├── suffix_trees │ │ ├── Makefile │ │ ├── README.md │ │ ├── bin │ │ │ └── .gitignore │ │ ├── compile_options.config │ │ ├── index.config │ │ ├── index_int.config │ │ ├── indexes │ │ │ └── .gitignore │ │ ├── results │ │ │ └── .gitignore │ │ ├── src │ │ │ ├── build_cst.cpp │ │ │ ├── depth_stats.cpp │ │ │ └── time_and_space_cst.cpp │ │ ├── stats │ │ │ └── .gitignore │ │ ├── test_case.config │ │ ├── test_case_int.config │ │ └── visualize │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── graph_data.R │ │ │ ├── output │ │ │ └── .gitignore │ │ │ ├── suffix_trees.R │ │ │ └── suffix_trees.tex │ ├── tmp │ │ └── .gitignore │ └── wavelet_trees │ │ ├── Makefile │ │ ├── README.md │ │ ├── bin │ │ └── .gitignore │ │ ├── compile_options.config │ │ ├── results │ │ └── .gitignore │ │ ├── src │ │ ├── gen_bwt.cpp │ │ └── wt_time_and_space.cpp │ │ ├── test_case.config │ │ ├── visualize │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── wt-footer.tex │ │ ├── wt-header.tex │ │ └── wt.R │ │ └── wt.config │ ├── build │ ├── .gitignore │ ├── build.sh │ └── clean.sh │ ├── examples │ ├── .gitignore │ ├── Makefile │ ├── bit-vector.cpp │ ├── c++11-initializer-list.cpp │ ├── construct-in-memory.cpp │ ├── csa-alphabet-strategy.cpp │ ├── cst-bfs-iterator.cpp │ ├── cst-node-child-iterator.cpp │ ├── fm-index.cpp │ ├── fm-rmq-index.cpp │ ├── hugepages.cpp │ ├── int-vector-buffer-iterator.cpp │ ├── int-vector-buffer.cpp │ ├── int-vector-entry.cpp │ ├── int-vector-mapper.cpp │ ├── intersect.cpp │ ├── isa_access.cpp │ ├── k2_treap_in_mem.cpp │ ├── louds-tree.cpp │ ├── memory-visualization.cpp │ ├── node_iterator.cpp │ ├── print_wt.cpp │ ├── range-minimum-queries.cpp │ ├── sa-construct-space-efficient.cpp │ ├── sa-int-construct-from-file.cpp │ ├── sd_vector_benchmark.cpp │ ├── standalone_lcp.cpp │ ├── storage-visualization.cpp │ ├── store_to_file.cpp │ ├── text-statistics.cpp │ ├── uint64-array2int_vector.cpp │ ├── write_structure.cpp │ └── wt_ap.cpp │ ├── external │ ├── CMakeLists.txt │ ├── d3 │ │ ├── LICENSE │ │ └── d3.min.js │ └── libdivsufsort │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── CMakeLists.txt │ │ ├── CMakeModules │ │ ├── AppendCompilerFlags.cmake │ │ ├── CheckFunctionKeywords.cmake │ │ ├── CheckLFS.cmake │ │ ├── ProjectCPack.cmake │ │ └── cmake_uninstall.cmake.in │ │ ├── LICENSE │ │ ├── README.md │ │ ├── VERSION.cmake │ │ ├── examples │ │ ├── CMakeLists.txt │ │ ├── bwt.c │ │ ├── mksary.c │ │ ├── sasearch.c │ │ ├── suftest.c │ │ └── unbwt.c │ │ ├── include │ │ ├── CMakeLists.txt │ │ ├── config.h.cmake │ │ ├── divsufsort.h.cmake │ │ ├── divsufsort_private.h │ │ └── lfs.h.cmake │ │ ├── lib │ │ ├── CMakeLists.txt │ │ ├── divsufsort.c │ │ ├── sssort.c │ │ ├── trsort.c │ │ └── utils.c │ │ └── pkgconfig │ │ ├── CMakeLists.txt │ │ └── libdivsufsort.pc.cmake │ ├── extras │ ├── Doxyfile.in │ ├── README.md │ ├── cheatsheet │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── hyperendnotes.sty │ │ ├── sdsl-cheatsheet.tex │ │ └── viz.pdf │ ├── literature.bib │ ├── pre-commit │ ├── resources │ │ └── space-vis.png │ ├── sdsl.gdb │ ├── sdsl.natvis │ └── sdsl_definitions.sty │ ├── include │ ├── CMakeLists.txt │ └── sdsl │ │ ├── .gitignore │ │ ├── CMakeLists.txt │ │ ├── bit_vector_il.hpp │ │ ├── bit_vectors.hpp │ │ ├── bits.hpp │ │ ├── bp_support.hpp │ │ ├── bp_support_algorithm.hpp │ │ ├── bp_support_g.hpp │ │ ├── bp_support_gg.hpp │ │ ├── bp_support_sada.hpp │ │ ├── coder.hpp │ │ ├── coder_comma.hpp │ │ ├── coder_elias_delta.hpp │ │ ├── coder_elias_gamma.hpp │ │ ├── coder_fibonacci.hpp │ │ ├── config.hpp │ │ ├── construct.hpp │ │ ├── construct_bwt.hpp │ │ ├── construct_config.hpp │ │ ├── construct_isa.hpp │ │ ├── construct_lcp.hpp │ │ ├── construct_lcp_helper.hpp │ │ ├── construct_sa.hpp │ │ ├── construct_sa_se.hpp │ │ ├── csa_alphabet_strategy.hpp │ │ ├── csa_bitcompressed.hpp │ │ ├── csa_sada.hpp │ │ ├── csa_sampling_strategy.hpp │ │ ├── csa_wt.hpp │ │ ├── cst_fully.hpp │ │ ├── cst_iterators.hpp │ │ ├── cst_sada.hpp │ │ ├── cst_sct3.hpp │ │ ├── dac_vector.hpp │ │ ├── enc_vector.hpp │ │ ├── fast_cache.hpp │ │ ├── hyb_vector.hpp │ │ ├── int_vector.hpp │ │ ├── int_vector_buffer.hpp │ │ ├── int_vector_io_wrappers.hpp │ │ ├── int_vector_mapper.hpp │ │ ├── inv_perm_support.hpp │ │ ├── io.hpp │ │ ├── iterators.hpp │ │ ├── k2_treap.hpp │ │ ├── k2_treap_algorithm.hpp │ │ ├── k2_treap_helper.hpp │ │ ├── k2_tree.hpp │ │ ├── k2_tree_helper.hpp │ │ ├── lcp.hpp │ │ ├── lcp_bitcompressed.hpp │ │ ├── lcp_byte.hpp │ │ ├── lcp_dac.hpp │ │ ├── lcp_support_sada.hpp │ │ ├── lcp_support_tree.hpp │ │ ├── lcp_support_tree2.hpp │ │ ├── lcp_vlc.hpp │ │ ├── lcp_wt.hpp │ │ ├── louds_tree.hpp │ │ ├── memory_management.hpp │ │ ├── nearest_neighbour_dictionary.hpp │ │ ├── nn_dict_dynamic.hpp │ │ ├── qsufsort.hpp │ │ ├── ram_filebuf.hpp │ │ ├── ram_fs.hpp │ │ ├── rank_support.hpp │ │ ├── rank_support_scan.hpp │ │ ├── rank_support_v.hpp │ │ ├── rank_support_v5.hpp │ │ ├── raster_img.hpp │ │ ├── rmq_succinct_sada.hpp │ │ ├── rmq_succinct_sct.hpp │ │ ├── rmq_support.hpp │ │ ├── rmq_support_sparse_table.hpp │ │ ├── rrr_helper.hpp │ │ ├── rrr_vector.hpp │ │ ├── rrr_vector_15.hpp │ │ ├── sd_vector.hpp │ │ ├── sdsl_concepts.hpp │ │ ├── select_support.hpp │ │ ├── select_support_mcl.hpp │ │ ├── select_support_scan.hpp │ │ ├── sfstream.hpp │ │ ├── sorted_int_stack.hpp │ │ ├── sorted_multi_stack_support.hpp │ │ ├── sorted_stack_support.hpp │ │ ├── structure_tree.hpp │ │ ├── suffix_array_algorithm.hpp │ │ ├── suffix_array_helper.hpp │ │ ├── suffix_arrays.hpp │ │ ├── suffix_tree_algorithm.hpp │ │ ├── suffix_tree_helper.hpp │ │ ├── suffix_trees.hpp │ │ ├── uint128_t.hpp │ │ ├── uint256_t.hpp │ │ ├── uintx_t.hpp │ │ ├── util.hpp │ │ ├── vectors.hpp │ │ ├── vlc_vector.hpp │ │ ├── wavelet_trees.hpp │ │ ├── wm_int.hpp │ │ ├── wt_algorithm.hpp │ │ ├── wt_ap.hpp │ │ ├── wt_blcd.hpp │ │ ├── wt_gmr.hpp │ │ ├── wt_helper.hpp │ │ ├── wt_huff.hpp │ │ ├── wt_hutu.hpp │ │ ├── wt_int.hpp │ │ ├── wt_pc.hpp │ │ └── wt_rlmn.hpp │ ├── install.bat │ ├── install.sh │ ├── lib │ ├── .gitignore │ ├── CMakeLists.txt │ ├── bits.cpp │ ├── bp_support_algorithm.cpp │ ├── coder_elias_delta.cpp │ ├── coder_elias_gamma.cpp │ ├── coder_fibonacci.cpp │ ├── config.cpp │ ├── construct_config.cpp │ ├── construct_isa.cpp │ ├── construct_lcp.cpp │ ├── construct_lcp_helper.cpp │ ├── construct_sa.cpp │ ├── construct_sa_se.cpp │ ├── csa_alphabet_strategy.cpp │ ├── io.cpp │ ├── lcp_support_tree.cpp │ ├── louds_tree.cpp │ ├── memory_management.cpp │ ├── nn_dict_dynamic.cpp │ ├── ram_filebuf.cpp │ ├── ram_fs.cpp │ ├── rrr_vector_15.cpp │ ├── sd_vector.cpp │ ├── sfstream.cpp │ ├── structure_tree.cpp.cmake │ ├── uint128_t.cpp │ ├── uint256_t.cpp │ ├── util.cpp │ └── wt_helper.cpp │ ├── sdsl-lite.pc.cmake │ ├── test │ ├── .gitignore │ ├── CMakeLists.txt │ ├── README.md │ ├── bit_vector_generator.cpp │ ├── bit_vector_test.config │ ├── bit_vector_test.cpp │ ├── bits_test.cpp │ ├── coder_test.cpp │ ├── compile_test.cpp.cmake │ ├── coverage │ │ ├── .gitignore │ │ ├── README.md │ │ ├── clean.sh │ │ └── run.sh │ ├── csa_byte_test.config │ ├── csa_byte_test.cpp │ ├── csa_int_test.config │ ├── csa_int_test.cpp │ ├── cst_byte_test.config │ ├── cst_byte_test.cpp │ ├── cst_helper.hpp │ ├── cst_int_test.config │ ├── cst_int_test.cpp │ ├── dac_vector_test.cpp │ ├── download.cmake │ ├── download.config │ ├── int_vector_buffer_test.cpp │ ├── int_vector_generator.cpp │ ├── int_vector_mapper_test.cpp │ ├── int_vector_test.cpp │ ├── inv_perm_support_test.cpp │ ├── k2_treap_test.config │ ├── k2_treap_test.cpp │ ├── k2_tree_test.cpp │ ├── lcp_construct_test.config │ ├── lcp_construct_test.cpp │ ├── nn_dict_dynamic_test.cpp │ ├── rank_support_test.config │ ├── rank_support_test.cpp │ ├── replace_int_vector_value.cpp │ ├── rmq_test.config │ ├── rmq_test.cpp │ ├── sa_construct_test.config │ ├── sa_construct_test.cpp │ ├── sd_vector_test.cpp │ ├── search_bidirectional_test.config │ ├── search_bidirectional_test.cpp │ ├── select_support_test.config │ ├── select_support_test.cpp │ ├── sorted_int_stack_test.cpp │ ├── sorted_stack_support_test.cpp │ ├── test_cases │ │ ├── .gitignore │ │ ├── 100a.txt │ │ ├── README.md │ │ ├── abc_abc_abc.txt │ │ ├── abc_abc_abc2.txt │ │ ├── all_symbols.txt │ │ ├── empty.txt │ │ ├── example01.txt │ │ ├── keeper.int │ │ └── one_byte.txt │ ├── tmp │ │ └── .gitignore │ ├── wt_byte_test.config │ ├── wt_byte_test.cpp │ ├── wt_int_test.config │ └── wt_int_test.cpp │ ├── tutorial │ ├── .gitignore │ ├── Makefile │ ├── cst-search.cpp │ ├── cst-traversal.cpp │ ├── csx-printf.cpp │ ├── document_listing │ │ ├── Makefile │ │ ├── doc_list_index.cpp │ │ └── generate_collection.py │ ├── expl-01.cpp │ ├── expl-02.cpp │ ├── expl-03.cpp │ ├── expl-04.cpp │ ├── expl-05.cpp │ ├── expl-06.cpp │ ├── expl-07.cpp │ ├── expl-08.cpp │ ├── expl-09.cpp │ ├── expl-10.cpp │ ├── expl-11.cpp │ ├── expl-12.cpp │ ├── expl-13.cpp │ ├── expl-14.cpp │ ├── expl-15.cpp │ ├── expl-16.cpp │ ├── expl-17.cpp │ ├── expl-18.cpp │ ├── expl-19.cpp │ ├── expl-20.cpp │ ├── expl-21.cpp │ ├── expl-22.cpp │ ├── expl-23.cpp │ ├── expl-24.cpp │ ├── expl-25.cpp │ ├── expl-26.cpp │ ├── int-vector-buffer.cpp │ ├── rmq-example.cpp │ └── use-a-wavelet-tree.cpp │ └── uninstall.sh ├── apps ├── CMakeLists.txt ├── counterMain.cpp ├── dumpMain.cpp ├── estimateMemoryMain.cpp ├── main.cpp └── playground.cpp ├── build_wrapper.sh ├── cmake └── CPM.cmake ├── conf.py ├── docs ├── Gemfile ├── LICENSE ├── Makefile ├── README.md ├── _config.yml ├── _layouts │ └── default.html ├── _sass │ ├── jekyll-theme-cayman.scss │ ├── normalize.scss │ ├── rouge-github.scss │ └── variables.scss ├── another-page.md ├── assets │ └── css │ │ └── style.scss ├── docs │ ├── CODE_OF_CONDUCT.md │ ├── CONTRIBUTING.md │ └── SUPPORT.md ├── index.md ├── jekyll-theme-cayman.gemspec ├── main │ ├── .github │ │ ├── CODEOWNERS │ │ ├── config.yml │ │ ├── no-response.yml │ │ ├── settings.yml │ │ └── stale.yml │ ├── .gitignore │ ├── .rubocop.yml │ └── .travis.yml ├── make.bat ├── python │ ├── README.md │ ├── coloredKDataFrame.markdown │ ├── indexing.markdown │ ├── kDataFrame.markdown │ ├── kDataFrameIterator.markdown │ ├── kmerCounting.markdown │ ├── kmerDecoder.markdown │ └── setFunctions.markdown ├── requirements.txt ├── script │ ├── bootstrap │ ├── cibuild │ ├── release │ ├── server │ └── validate-html ├── source │ ├── CITATION.md │ ├── FAQ.md │ ├── LICENCE.md │ ├── _static │ │ └── images │ │ │ └── kDataFrame.png │ ├── conf.py │ ├── cpp_api.rst │ ├── get_started.md │ ├── index.rst │ ├── py_api.rst │ ├── recipes.rst │ └── recipes │ │ ├── recipe_1.ipynb │ │ ├── recipe_2.ipynb │ │ ├── recipe_3.ipynb │ │ ├── recipe_4.ipynb │ │ ├── recipe_5.ipynb │ │ └── recipe_6.ipynb └── thumbnail.png ├── include └── kProcessor │ ├── Utils │ └── utils.hpp │ ├── algorithms.hpp │ ├── batchQuery.hpp │ ├── colorTable.hpp │ ├── colored_kDataFrame.hpp │ └── kDataFrame.hpp ├── kProcessor.doxygen ├── kProcessor ├── __init__.py ├── colored_kDataFrame.py ├── kDataFrame.py ├── kDataFrameIterator.py ├── kDataFrameMAP.py ├── kDataFrameMQF.py ├── kDataFramePHMAP.py ├── kmerRow.py ├── seqs_to_kmers.py └── set_functions.py ├── setup.py ├── src ├── Utils │ └── utils.cpp ├── algorithms.cpp ├── batchQuery.cpp ├── colorTable.cpp └── kDataFrames │ ├── colored_kDataFrame.cpp │ ├── kDataFrame.cpp │ ├── kDataFrameBMQF.cpp │ ├── kDataFrameMAP.cpp │ ├── kDataFrameMQF.cpp │ └── kDataFramePHMAP.cpp ├── swig_interfaces ├── HashUtils │ └── hashutil.i ├── Utils │ └── kmer.i ├── algorithms │ └── algorithms.i ├── batchQuery.i ├── colorTable.i ├── colored_kDataFrame.i ├── kDataFrame │ ├── kDataFrame.i │ ├── kDataFrameBMQF.i │ ├── kDataFrameIterator.i │ ├── kDataFrameMAP.i │ ├── kDataFrameMQF.i │ ├── kDataFramePHMAP.i │ └── kmerRow.i ├── kProcessor.i └── modules │ ├── custom_typemaps.i │ ├── std_map.i │ ├── std_unordered_map.i │ └── sys_args.i ├── tests ├── CMakeLists.txt ├── kProcessorLibTests │ ├── CMakeLists.txt │ ├── main.cpp │ ├── testkDataFrame.cpp │ └── testkDataframe.h ├── python │ ├── params │ │ ├── __init__.py │ │ └── params.py │ ├── test_indexing.py │ ├── test_kDataFrameBMQF.py │ ├── test_kDataFrameMAP.py │ ├── test_kDataFrameMQF.py │ ├── test_kDataFrameMultiColumn.py │ ├── test_kDataFramePHMAP.py │ ├── test_kmerCounting.py │ ├── test_kmerDecoder.py │ ├── test_saveAndLoad.py │ └── test_setFunctions.py └── testData │ ├── .stxxl │ ├── small.fa │ ├── test.fastq │ ├── test.noN.dsk.txt │ ├── test.noN.fastq │ ├── test.noN.fastq.ntCardRes │ ├── test1.fa │ ├── test1.fa.names │ ├── test2.noN.fastq │ ├── test2.noN.fastq.ntCardRes │ └── test3.noN.fastq └── version.py /.github/workflows/ubuntu.yml: -------------------------------------------------------------------------------- 1 | name: Ubuntu 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | branches: 9 | - master 10 | 11 | env: 12 | CTEST_OUTPUT_ON_FAILURE: 1 13 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} 14 | CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules 15 | 16 | jobs: 17 | build: 18 | runs-on: ubuntu-18.04 19 | 20 | steps: 21 | - uses: actions/checkout@v2 22 | with: 23 | submodules: recursive 24 | 25 | - name: install boost 26 | run: sudo apt-get install libboost-all-dev 27 | 28 | - uses: actions/setup-python@v2 29 | with: 30 | python-version: '3.6' 31 | 32 | - name: install_cmake 33 | run: pip install cmake 34 | 35 | # - name: configure 36 | # run: cmake -Stest -Bbuild -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug 37 | 38 | - name: configure 39 | run: cmake -Bbuild 40 | 41 | - name: build 42 | run: cmake --build build -j4 43 | 44 | # - name: test 45 | # run: | 46 | # cd build 47 | # ctest --build-config Debug 48 | - name: collect code coverage 49 | run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | 34 | build/* 35 | Kprocessor 36 | docs/doxygen/* 37 | 38 | cmake-build-debug/tests/gtest/src/gtest2/googletest/scripts/test/Makefile 39 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ThirdParty/kmerDecoder"] 2 | path = ThirdParty/kmerDecoder 3 | url = https://github.com/dib-lab/kmerDecoder.git 4 | [submodule "ThirdParty/cereal"] 5 | path = ThirdParty/cereal 6 | url = https://github.com/USCiLab/cereal.git 7 | [submodule "ThirdParty/MQF"] 8 | path = ThirdParty/MQF 9 | url = https://github.com/dib-lab/MQF 10 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | 8 | # Build documentation in the docs/ directory with Sphinx 9 | sphinx: 10 | configuration: docs/source/conf.py 11 | 12 | # Build documentation with MkDocs 13 | #mkdocs: 14 | # configuration: mkdocs.yml 15 | 16 | # Optionally build your docs in additional formats such as PDF and ePub 17 | formats: all 18 | 19 | # Optionally set the version of Python and requirements required to build your docs 20 | python: 21 | version: 3.7 22 | install: 23 | - requirements: docs/requirements.txt -------------------------------------------------------------------------------- /Doxyfile: -------------------------------------------------------------------------------- 1 | # Configuration for Doxygen for use with CMake 2 | # Only options that deviate from the default are included 3 | # To create a new Doxyfile containing all available options, call `doxygen -g` 4 | 5 | # Get Project name and version from CMake 6 | PROJECT_NAME = @DOXYGEN_PROJECT_NAME@ 7 | PROJECT_NUMBER = @DOXYGEN_PROJECT_VERSION@ 8 | 9 | # Add sources 10 | INPUT = @DOXYGEN_PROJECT_ROOT@/README.md @DOXYGEN_PROJECT_ROOT@/include # @DOXYGEN_PROJECT_ROOT@/documentation/pages 11 | EXTRACT_ALL = YES 12 | RECURSIVE = YES 13 | OUTPUT_DIRECTORY = @DOXYGEN_OUTPUT_DIRECTORY@ 14 | 15 | # Use the README as a main page 16 | USE_MDFILE_AS_MAINPAGE = @DOXYGEN_PROJECT_ROOT@/README.md 17 | 18 | # set relative include paths 19 | FULL_PATH_NAMES = YES 20 | STRIP_FROM_PATH = @DOXYGEN_PROJECT_ROOT@/include @DOXYGEN_PROJECT_ROOT@ 21 | 22 | # We use m.css to generate the html documentation, so we only need XML output 23 | GENERATE_XML = YES 24 | GENERATE_HTML = NO 25 | GENERATE_LATEX = NO 26 | XML_PROGRAMLISTING = NO 27 | CREATE_SUBDIRS = NO 28 | 29 | # Include all directories, files and namespaces in the documentation 30 | # Disable to include only explicitly documented objects 31 | M_SHOW_UNDOCUMENTED = YES 32 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | # Include the README 2 | include *.md 3 | 4 | # Include the license file 5 | include LICENSE 6 | 7 | # Include the headers files 8 | recursive-include include * 9 | recursive-include ThirdParty/MQF/include * 10 | recursive-include ThirdParty/MQF/include * 11 | recursive-include ThirdParty/json * 12 | recursive-include ThirdParty/sdsl-lite/include * 13 | recursive-include ThirdParty/kmerDecoder/include * 14 | recursive-include ThirdParty/kmerDecoder/lib/parallel-hashmap * 15 | recursive-include ThirdParty/kmerDecoder/lib/kseq/include * 16 | 17 | recursive-include KP_BUILD lib*a 18 | recursive-include ThirdParty lib*a 19 | 20 | # Include static libs 21 | include KP_BUILD/libkProcessor.a 22 | include KP_BUILD/ThirdParty/kmerDecoder/libkmerDecoder.a 23 | include KP_BUILD/ThirdParty/MQF/src/libMQF.a 24 | include KP_BUILD/ThirdParty/sdsl-lite/lib/libsdsl.a 25 | 26 | #include version 27 | include version.py 28 | 29 | # Include SWIG interfaces 30 | recursive-include swig_interfaces * 31 | -------------------------------------------------------------------------------- /ThirdParty/TBB/include/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Overview

5 | Include files for Intel® Threading Building Blocks (Intel® TBB). 6 | 7 |

Directories

8 |
9 |
tbb 10 |
Include files for Intel TBB classes and functions. 11 |
serial/tbb 12 |
Include files for a sequential implementation of the parallel_for algorithm. 13 |
14 | 15 |
16 | Up to parent directory 17 |

18 | Copyright © 2005-2018 Intel Corporation. All Rights Reserved. 19 |

20 | Intel is a registered trademark or trademark of Intel Corporation 21 | or its subsidiaries in the United States and other countries. 22 |

23 | * Other names and brands may be claimed as the property of others. 24 | 25 | 26 | -------------------------------------------------------------------------------- /ThirdParty/TBB/include/serial/tbb/tbb_annotate.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2005-2018 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | 17 | 18 | 19 | */ 20 | 21 | #ifndef __TBB_annotate_H 22 | #define __TBB_annotate_H 23 | 24 | // Macros used by the Intel(R) Parallel Advisor. 25 | #ifdef __TBB_NORMAL_EXECUTION 26 | #define ANNOTATE_SITE_BEGIN( site ) 27 | #define ANNOTATE_SITE_END( site ) 28 | #define ANNOTATE_TASK_BEGIN( task ) 29 | #define ANNOTATE_TASK_END( task ) 30 | #define ANNOTATE_LOCK_ACQUIRE( lock ) 31 | #define ANNOTATE_LOCK_RELEASE( lock ) 32 | #else 33 | #include 34 | #endif 35 | 36 | #endif /* __TBB_annotate_H */ 37 | -------------------------------------------------------------------------------- /ThirdParty/TBB/include/tbb/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Overview

5 | Include files for Intel® Threading Building Blocks classes and functions. 6 | 7 |
Click here to see all files in the directory. 8 | 9 |

Directories

10 |
11 |
compat 12 |
Include files for source level compatibility with other frameworks. 13 |
internal 14 |
Include files with implementation details; not for direct use. 15 |
machine 16 |
Include files for low-level architecture specific functionality; not for direct use. 17 |
18 | 19 |
20 | Up to parent directory 21 |

22 | Copyright © 2005-2018 Intel Corporation. All Rights Reserved. 23 |

24 | Intel is a registered trademark or trademark of Intel Corporation 25 | or its subsidiaries in the United States and other countries. 26 |

27 | * Other names and brands may be claimed as the property of others. 28 | 29 | 30 | -------------------------------------------------------------------------------- /ThirdParty/TBB/include/tbb/tbb_disable_exceptions.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2005-2018 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | 17 | 18 | 19 | */ 20 | 21 | //! To disable use of exceptions, include this header before any other header file from the library. 22 | 23 | //! The macro that prevents use of exceptions in the library files 24 | #undef TBB_USE_EXCEPTIONS 25 | #define TBB_USE_EXCEPTIONS 0 26 | 27 | //! Prevent compilers from issuing exception related warnings. 28 | /** Note that the warnings are suppressed for all the code after this header is included. */ 29 | #if _MSC_VER 30 | #if __INTEL_COMPILER 31 | #pragma warning (disable: 583) 32 | #else 33 | #pragma warning (disable: 4530 4577) 34 | #endif 35 | #endif 36 | -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbb.so: -------------------------------------------------------------------------------- 1 | INPUT (libtbb.so.2) 2 | -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbb.so.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/ThirdParty/TBB/lib/intel64/gcc4.7/libtbb.so.2 -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbb_debug.so: -------------------------------------------------------------------------------- 1 | INPUT (libtbb_debug.so.2) 2 | -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbb_debug.so.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/ThirdParty/TBB/lib/intel64/gcc4.7/libtbb_debug.so.2 -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbb_preview.so: -------------------------------------------------------------------------------- 1 | INPUT (libtbb_preview.so.2) 2 | -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbb_preview.so.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/ThirdParty/TBB/lib/intel64/gcc4.7/libtbb_preview.so.2 -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbb_preview_debug.so: -------------------------------------------------------------------------------- 1 | INPUT (libtbb_preview_debug.so.2) 2 | -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbb_preview_debug.so.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/ThirdParty/TBB/lib/intel64/gcc4.7/libtbb_preview_debug.so.2 -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbbmalloc.so: -------------------------------------------------------------------------------- 1 | INPUT (libtbbmalloc.so.2) 2 | -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbbmalloc.so.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/ThirdParty/TBB/lib/intel64/gcc4.7/libtbbmalloc.so.2 -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbbmalloc_debug.so: -------------------------------------------------------------------------------- 1 | INPUT (libtbbmalloc_debug.so.2) 2 | -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbbmalloc_debug.so.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/ThirdParty/TBB/lib/intel64/gcc4.7/libtbbmalloc_debug.so.2 -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbbmalloc_proxy.so: -------------------------------------------------------------------------------- 1 | INPUT (libtbbmalloc_proxy.so.2) 2 | -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbbmalloc_proxy.so.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/ThirdParty/TBB/lib/intel64/gcc4.7/libtbbmalloc_proxy.so.2 -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbbmalloc_proxy_debug.so: -------------------------------------------------------------------------------- 1 | INPUT (libtbbmalloc_proxy_debug.so.2) 2 | -------------------------------------------------------------------------------- /ThirdParty/TBB/lib/intel64/gcc4.7/libtbbmalloc_proxy_debug.so.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/ThirdParty/TBB/lib/intel64/gcc4.7/libtbbmalloc_proxy_debug.so.2 -------------------------------------------------------------------------------- /ThirdParty/ntCard/.gitignore: -------------------------------------------------------------------------------- 1 | .deps/* 2 | Common/.* 3 | Makefile 4 | Makefile.in 5 | aclocal.m4 6 | autom4te.cache/ 7 | compile 8 | config.h 9 | config.h.in 10 | config.log 11 | config.status 12 | configure 13 | depcomp 14 | install-sh 15 | missing 16 | stamp-h1 17 | share/* 18 | src/* 19 | tmp/* 20 | -------------------------------------------------------------------------------- /ThirdParty/ntCard/CITATION.bib: -------------------------------------------------------------------------------- 1 | @article{doi:10.1093/bioinformatics/btw832, 2 | author = {Mohamadi, Hamid and Khan, Hamza and Birol, Inanc}, 3 | title = {ntCard: a streaming algorithm for cardinality estimation in genomics data}, 4 | journal = {Bioinformatics}, 5 | volume = {33}, 6 | number = {9}, 7 | pages = {1324}, 8 | year = {2017}, 9 | doi = {10.1093/bioinformatics/btw832}, 10 | URL = { + http://dx.doi.org/10.1093/bioinformatics/btw832}, 11 | eprint = {/oup/backfile/content_public/journal/bioinformatics/33/9/10.1093_bioinformatics_btw832/2/btw832.pdf} 12 | } 13 | -------------------------------------------------------------------------------- /ThirdParty/ntCard/ChangeLog: -------------------------------------------------------------------------------- 1 | 2017-01-11 Hamid Mohamadi 2 | 3 | * Release version 1.0.0 4 | -------------------------------------------------------------------------------- /ThirdParty/ntCard/Common/Fcontrol.cpp: -------------------------------------------------------------------------------- 1 | #include "Fcontrol.h" 2 | #include 3 | 4 | /* Set the FD_CLOEXEC flag of the specified file descriptor. */ 5 | int setCloexec(int fd) 6 | { 7 | int flags = fcntl(fd, F_GETFD, 0); 8 | if (flags == -1) 9 | return -1; 10 | flags |= FD_CLOEXEC; 11 | return fcntl(fd, F_SETFD, flags); 12 | } 13 | -------------------------------------------------------------------------------- /ThirdParty/ntCard/Common/Fcontrol.h: -------------------------------------------------------------------------------- 1 | #ifndef FCONTROL_H 2 | #define FCONTROL_H 1 3 | 4 | int setCloexec(int fd); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /ThirdParty/ntCard/Common/SignalHandler.h: -------------------------------------------------------------------------------- 1 | #ifndef SIGNALHANDLER_H 2 | #define SIGNALHANDLER_H 1 3 | 4 | void signalInit(); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /ThirdParty/ntCard/Common/Uncompress.h: -------------------------------------------------------------------------------- 1 | #ifndef UNCOMPRESS_H 2 | #define UNCOMPRESS_H 1 3 | 4 | bool uncompress_init(); 5 | 6 | namespace { 7 | const bool uncompressInitialized = uncompress_init(); 8 | bool getUncompressInitialized() __attribute__((unused)); 9 | bool getUncompressInitialized() { 10 | return uncompressInitialized; 11 | } 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /ThirdParty/ntCard/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Hamid Mohamadi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ThirdParty/ntCard/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LIBRARIES = libntcard.a 2 | 3 | libntcard_a_CPPFLAGS = -I$(top_srcdir)/Common 4 | 5 | libntcard_a_SOURCES = \ 6 | Common/Uncompress.cpp \ 7 | Common/Uncompress.h \ 8 | Common/SignalHandler.cpp \ 9 | Common/SignalHandler.h \ 10 | Common/StringUtil.h \ 11 | Common/Fcontrol.cpp \ 12 | Common/Fcontrol.h \ 13 | Common/nthash.hpp \ 14 | Common/ntHashIterator.hpp \ 15 | libntcard.cpp 16 | 17 | 18 | dist_doc_DATA = \ 19 | ChangeLog \ 20 | CITATION.bib \ 21 | LICENSE \ 22 | README.md 23 | 24 | EXTRA_DIST=autogen.sh 25 | -------------------------------------------------------------------------------- /ThirdParty/ntCard/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -ex 3 | aclocal 4 | autoconf 5 | autoheader 6 | automake -a 7 | -------------------------------------------------------------------------------- /ThirdParty/ntCard/include/ntcard.hpp: -------------------------------------------------------------------------------- 1 | #ifndef ntCard_HPP 2 | #define ntCard_HPP 3 | int main_ntCard(string inputFile,unsigned myK, uint32_t cov, int nThreads,string prefix); 4 | #endif 5 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/.gitignore: -------------------------------------------------------------------------------- 1 | Make.helper 2 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "external/googletest"] 2 | path = external/googletest 3 | url = https://github.com/google/googletest.git 4 | [submodule "external/libdivsufsort"] 5 | path = external/libdivsufsort 6 | url = https://github.com/simongog/libdivsufsort.git 7 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/CMakeModules/CheckSSE4_2.cmake: -------------------------------------------------------------------------------- 1 | # Check if the CPU provides fast operations 2 | # for popcount, leftmost and rightmost bit 3 | 4 | set(BUILTIN_POPCNT 0) 5 | if(DEFINED ENV{BUILD_PORTABLE}) 6 | #message(STATUS "sse4.2 disabled") 7 | # Check if we are on a Linux system 8 | elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") 9 | # Use /proc/cpuinfo to get the information 10 | file(STRINGS "/proc/cpuinfo" _cpuinfo) 11 | if(_cpuinfo MATCHES "(sse4_2)|(sse4a)") 12 | set(BUILTIN_POPCNT 1) 13 | endif() 14 | elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") 15 | # handle windows 16 | # get_filename_component(_vendor_id "[HKEY_LOCAL_MACHINE\\Hardware\\Description\\System\\CentralProcessor\\0;VendorIdentifier]" NAME CACHE) 17 | # get_filename_component(_cpu_id "[HKEY_LOCAL_MACHINE\\Hardware\\Description\\System\\CentralProcessor\\0;Identifier]" NAME CACHE) 18 | elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") 19 | # handle MacOs 20 | execute_process(COMMAND sysctl -n machdep.cpu.features 21 | OUTPUT_VARIABLE _cpuinfo OUTPUT_STRIP_TRAILING_WHITESPACE) 22 | if(_cpuinfo MATCHES "SSE4.2") 23 | set(BUILTIN_POPCNT 1) 24 | endif() 25 | endif() 26 | 27 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/CMakeModules/FindCxaDemangle.cmake: -------------------------------------------------------------------------------- 1 | # Module that checks whether the compiler supports the 2 | # abi::__cxa_demangle function required to 3 | # make the type names returned by typeid() human-readable 4 | # 5 | # Sets the following variable: 6 | # HAVE_CXA_DEMANGLE 7 | # 8 | # perform tests 9 | include(CheckCXXSourceCompiles) 10 | 11 | CHECK_CXX_SOURCE_COMPILES("#include 12 | int main(void){ 13 | int foobar = 0; 14 | const char *foo = typeid(foobar).name(); 15 | int status; 16 | char *demangled = abi::__cxa_demangle( foo, 0, 0, &status ); 17 | }" HAVE_CXA_DEMANGLE) 18 | 19 | include (FindPackageHandleStandardArgs) 20 | # prevent useless message from being displayed 21 | set (FIND_PACKAGE_MESSAGE_DETAILS_CxaDemangle "[1][v()]" 22 | CACHE INTERNAL "Details about finding CxaDemangle") 23 | find_package_handle_standard_args (CxaDemangle DEFAULT_MSG HAVE_CXA_DEMANGLE) 24 | 25 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/CMakeModules/check_mode_ti.cpp: -------------------------------------------------------------------------------- 1 | typedef unsigned int uint128_t __attribute__((mode(TI))); 2 | 3 | int main() { 4 | return 0; 5 | } 6 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/COPYING: -------------------------------------------------------------------------------- 1 | The sdsl copyright is as follows: 2 | 3 | Copyright (C) 2007-2014 Simon Gog All Right Reserved. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see http://www.gnu.org/licenses/ . 17 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/Make.helper.cmake: -------------------------------------------------------------------------------- 1 | LIB_DIR = @CMAKE_INSTALL_PREFIX@/lib 2 | INC_DIR = @CMAKE_INSTALL_PREFIX@/include 3 | MY_CXX_FLAGS=@CMAKE_CXX_FLAGS@ $(CODE_COVER) 4 | MY_CXX_OPT_FLAGS=@CMAKE_CXX_OPT_FLAGS@ 5 | MY_CXX=@CMAKE_CXX_COMPILER@ 6 | MY_CC=@CMAKE_C_COMPILER@ 7 | 8 | # Returns $1-th .-separated part of string $2. 9 | dim = $(word $1, $(subst ., ,$2)) 10 | 11 | # Returns value stored in column $3 for item with ID $2 in 12 | # config file $1 13 | config_select=$(shell cat $1 | grep -v "^\#" | grep "$2;" | cut -f $3 -d';' ) 14 | 15 | # Returns value stored in column $3 for a line matching $2 16 | # in config file $1 17 | config_filter=$(shell cat $1 | grep -v "^\#" | fgrep "$2" | cut -f $3 -d';' ) 18 | 19 | # Get all IDs from a config file $1 20 | config_ids=$(shell cat $1 | grep -v "^\#" | cut -f 1 -d';') 21 | 22 | # Get column $2 from a config file $1 23 | config_column=$(shell cat $1 | grep -v "^\#" | cut -f $2 -d';') 24 | 25 | # Get size of file $1 in bytes 26 | file_size=$(shell wc -c < $1 | tr -d ' ') 27 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/VERSION: -------------------------------------------------------------------------------- 1 | 2.1.0 2 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/Make.download: -------------------------------------------------------------------------------- 1 | ../data/%: 2 | $(eval URL:=$(firstword $(call config_filter,test_case.config,$@,4))) 3 | @$(if $(URL),,\ 4 | $(error "No download link nor generation program specified for test case $@") ) 5 | @echo "Download input from $(URL) using curl" 6 | $(eval DEST_DIR:=$(shell dirname $@)) 7 | cd $(DEST_DIR); curl -O $(URL) 8 | $(eval FILE:=$(DEST_DIR)/$(notdir $(URL))) 9 | @$(if $(filter %.gz,$(FILE)),\ 10 | echo "Extract file $(FILE) using gunzip";\ 11 | gunzip $(FILE)) 12 | 13 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !get_corpus.sh 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/dic.config: -------------------------------------------------------------------------------- 1 | # Configuration file for dictionary files 2 | # for integer based inputs 3 | # 4 | # (1) Identifier for test integer test file 5 | # (has to exist in test_case_int.config) 6 | # (2) Path to dictionary 7 | # (3) LaTeX name 8 | # (4) Download link (if the test is available online) 9 | ENWIKISMLINT;dic/enwiki-20130805-pages-articles1.dic;enwiki-dic;http://people.eng.unimelb.edu.au/sgog/data/enwiki-20130805-pages-articles1.dic.gz 10 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/dic/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/index.config: -------------------------------------------------------------------------------- 1 | # This file specified sdsl index structures that are used in the benchmark. 2 | # 3 | # Each index is specified by a triple: INDEX_ID;SDSL_TYPE;INDEX_LATEX_NAME 4 | # * INDEX_ID : An identifier for the index. Only letters and underscores 5 | # are allowed in INDEX_ID. 6 | # * TYPE : Corresponding type. 7 | # * LATEX_NAME: LaTeX name for output in the benchmark report. 8 | GREEDY;doc_list_index_greedy<>;GREEDY 9 | #GREEDYX;doc_list_index_greedy,1000000,1000000,sa_order_sa_sampling<>,isa_sampling<>,byte_alphabet>>;GREEDYX 10 | #GREEDYY;doc_list_index_greedy>,1000000,1000000,sa_order_sa_sampling<>,isa_sampling<>,byte_alphabet>>;GREEDYY 11 | #GREEDY-RRR;doc_list_index_greedy>,1000000,1000000>,wt_int>>;GREEDY-RRR 12 | #QPROBING;doc_list_index_qprobing<>;QPROBING 13 | SADA;doc_list_index_sada, 32, 1000000, text_order_sa_sampling>>>;SADA 14 | SORT;doc_list_index_sort<>;SORT 15 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/index_int.config: -------------------------------------------------------------------------------- 1 | # This file specified sdsl index structures that are used in the benchmark. 2 | # 3 | # Each index is specified by a triple: INDEX_ID;SDSL_TYPE;INDEX_LATEX_NAME 4 | # * INDEX_ID : An identifier for the index. Only letters and underscores 5 | # are allowed in INDEX_ID. 6 | # * TYPE : Corresponding type. 7 | # * LATEX_NAME: LaTeX name for output in the benchmark report. 8 | GREEDYINT;doc_list_index_greedy>,1000000,1000000>>;GREEDY-I 9 | #GREEDYINTX;doc_list_index_greedy,1000000,1000000>>;GREEDY-IX 10 | #GREEDYINTY;doc_list_index_greedy>,1000000,1000000>>;GREEDY-IY 11 | SADAINT;doc_list_index_sada, 32, 1000000, text_order_sa_sampling>>>;SADA-I 12 | SORTINT;doc_list_index_sort, 32, 1000000, text_order_sa_sampling>>>;SORT-I 13 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/indexes/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/info/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/pattern/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/pattern_length.config: -------------------------------------------------------------------------------- 1 | # pattern length 2 | 3; 3 | 4; 4 | 5; 5 | 6; 6 | 7; 7 | 8; 8 | 9; 9 | 10; 10 | 11; 11 | 12; 12 | 13; 13 | 14; 14 | 15; 15 | 16; 16 | 17; 17 | 18; 18 | 19; 19 | 20; 20 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/pattern_length_int.config: -------------------------------------------------------------------------------- 1 | # pattern length 2 | 2; 3 | 3; 4 | 4; 5 | 5; 6 | 6; 7 | 7; 8 | 8; 9 | 9; 10 | 10; 11 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/results/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/src/build_idx.cpp: -------------------------------------------------------------------------------- 1 | #include "doc_list_index.hpp" 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace std; 7 | using namespace sdsl; 8 | 9 | using idx_type = IDX_TYPE; 10 | 11 | int main(int argc, char* argv[]) 12 | { 13 | if (argc < 4) { 14 | cout << "Usage: " << argv[0] << " collection_file tmp_dir index_file" << endl; 15 | cout << " Generates an index and stores result in index_file" << endl; 16 | cout << " Temporary files are stored in tmp_dir." << endl; 17 | return 1; 18 | } 19 | string collection_file = argv[1]; 20 | string id = util::basename(collection_file); 21 | string tmp_dir = argv[2]; 22 | string idx_file = argv[3]; 23 | 24 | using timer = std::chrono::high_resolution_clock; 25 | auto start = timer::now(); 26 | 27 | idx_type idx; 28 | cache_config cconfig(false, tmp_dir, id); 29 | construct(idx, collection_file, cconfig, idx_type::WIDTH==8 ? 1 : 0); 30 | auto stop = timer::now(); 31 | auto elapsed = stop-start; 32 | std::cout << "construction time = " << std::chrono::duration_cast(elapsed).count() << std::endl; 33 | store_to_file(idx, idx_file); 34 | } 35 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/src/doc_list_index.hpp: -------------------------------------------------------------------------------- 1 | #ifndef DOC_LIST_INDEX 2 | #define DOC_LIST_INDEX 3 | 4 | #include 5 | #include 6 | 7 | struct doc_list_tag {}; 8 | 9 | template 10 | void 11 | construct(t_index& idx, const std::string& file, sdsl::cache_config& config, uint8_t num_bytes, doc_list_tag) 12 | { 13 | t_index tmp_idx(file, config, num_bytes); 14 | idx.swap(tmp_idx); 15 | } 16 | 17 | #include "doc_list_index_sada.hpp" 18 | #include "doc_list_index_greedy.hpp" 19 | #include "doc_list_index_qprobing.hpp" 20 | #include "doc_list_index_sort.hpp" 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/src/size_of_idx.cpp: -------------------------------------------------------------------------------- 1 | #include "doc_list_index.hpp" 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | using namespace sdsl; 7 | 8 | using idx_type = IDX_TYPE; 9 | 10 | int main(int argc, char* argv[]) 11 | { 12 | if (argc < 2) { 13 | cout << "Usage: " << argv[0] << " index_file [html_file]" << endl; 14 | return 1; 15 | } 16 | string index_file = string(argv[1]); 17 | idx_type idx; 18 | 19 | if (!load_from_file(idx, index_file)) { 20 | std::cerr << "Could not load index file" << std::endl; 21 | return 1; 22 | } 23 | if (argc > 2) { 24 | ofstream out(argv[2]); 25 | write_structure(idx, out); 26 | } else { 27 | cout<<"# index_file = "< i2w; 31 | string word; 32 | while (dic_in >> word) { 33 | uint64_t nr, occ; 34 | dic_in >> nr >> occ; 35 | i2w[nr] = word; 36 | } 37 | while (pat_in.getline(buffer, buf_size)) { 38 | stringstream ss; 39 | ss << string(buffer); 40 | uint64_t w; 41 | while (ss >> w) { 42 | cout << i2w[w] << " "; 43 | } 44 | cout << "\n"; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/test_case.config: -------------------------------------------------------------------------------- 1 | # Configuration for test files 2 | # (1) Identifier for test file 3 | # (2) Path to the test file 4 | # (3) LaTeX name 5 | # (4) Download link (if the test is available online) 6 | ENWIKISML;../data/enwiki-20130805-pages-articles1.txt;enwiki-sml;http://people.eng.unimelb.edu.au/sgog/data/enwiki-20130805-pages-articles1.txt.gz 7 | PROTEINS;../data/proteins.txt;proteins;http://people.eng.unimelb.edu.au/sgog/data/proteins.txt.gz 8 | #WSJ;../data/wsj.char.100MB;WSJ 9 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/test_case_int.config: -------------------------------------------------------------------------------- 1 | # Configuration for integer test files 2 | # (1) Identifier for test file 3 | # (2) Path to the test file 4 | # (3) LaTeX name 5 | # (4) Download link (if the test is available online) 6 | ENWIKISMLINT;../data/enwiki-20130805-pages-articles1.int.sdsl;enwiki-sml-int;http://people.eng.unimelb.edu.au/sgog/data/enwiki-20130805-pages-articles1.int.sdsl.gz 7 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/visualize/.gitignore: -------------------------------------------------------------------------------- 1 | doc_re_time.aux 2 | doc_re_time.log 3 | doc_re_time.pdf 4 | fig-runtime.tex 5 | fig-runtime_int.tex 6 | tbl-indexes.tex 7 | tbl-indexes_int.tex 8 | tbl-sizes_int.tex 9 | tbl-sizes.tex 10 | LaTeX.log 11 | R.log 12 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/visualize/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../Make.helper 2 | CONFIG_FILES=../index.config ../test_case.config ../pattern_length.config \ 3 | ../index_int.config ../test_case_int.config ../pattern_length_int.config 4 | 5 | all: doc_re_time.pdf 6 | 7 | doc_re_time.pdf: doc_re_time.tex \ 8 | fig-runtime.tex fig-runtime_int.tex \ 9 | tbl-sizes.tex tbl-sizes_int.tex \ 10 | tbl-indexes.tex tbl-indexes_int.tex \ 11 | tbl-collections.tex tbl-collections_int.tex 12 | @echo "Use pdflatex to generate doc_re_time.pdf" 13 | @pdflatex doc_re_time.tex >> LaTeX.log 2>&1 14 | 15 | #tbl-locate.tex fig-locate.tex: ../../basic_functions.R locate.R $(CONFIG_FILES) ../results/all.txt 16 | # @echo "Use R to generate tbl-locate.tex and fig-locate.tex" 17 | fig-runtime.tex fig-runtime_int.tex tbl-indexes.tex tbl-indexes_int.tex tbl-sizes.tex tbl-sizes_int.tex tbl-collections.tex tbl-collections_int.tex: ../../basic_functions.R runtime.R \ 18 | $(CONFIG_FILES) ../results/all.txt \ 19 | ../info/sizes.txt ../info/sizes_int.txt 20 | @R --vanilla < runtime.R > R.log 2>&1 21 | 22 | clean: 23 | rm -f doc_re_time.pdf doc_re_time.aux \ 24 | fig-runtime.tex tbl-indexes.tex \ 25 | fig-runtime_int.tex tbl-indexes_int.tex \ 26 | tbl-sizes.tex tbl-sizes_int.tex \ 27 | tbl-collections.tex tbl-collections_int.tex \ 28 | doc_re_time.log R.log LaTeX.log 29 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/visualize/index-filter.config: -------------------------------------------------------------------------------- 1 | # Use this file to specify which indexes are listed in the report doc_re_time.pdf 2 | # and how they look like in the report. 3 | # 4 | # List all the index ids which should be included in the report. Note that 5 | # the listed index ids must also be present in the file `../index.config`. 6 | # Each INDEX_ID should be listed on a separate line followed by the style: 7 | # [pch];[lty];[col] (point type, line type, and color). 8 | GREEDY;1;solid;black 9 | QPROBING;2;solid;blue 10 | #GREEDYX;2;solid;blue 11 | #GREEDYY;2;solid;green 12 | SADA;3;solid;red 13 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/document_retrieval/visualize/index-filter_int.config: -------------------------------------------------------------------------------- 1 | # Use this file to specify which indexes are listed in the report doc_re_time.pdf 2 | # and how they look like in the report. 3 | # 4 | # List all the index ids which should be included in the report. Note that 5 | # the listed index ids must also be present in the file `../index_int.config`. 6 | # Each INDEX_ID should be listed on a separate line followed by the style: 7 | # [pch];[lty];[col] (point type, line type, and color). 8 | GREEDYINT;1;solid;black 9 | QPROBINGINT;2;solid;blue 10 | #GREEDYINTX;2;solid;blue 11 | #GREEDYINTY;2;solid;green 12 | SADAINT;3;solid;red 13 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_count/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !HP 3 | !NOSSE 4 | !NOOPT 5 | !.gitignore 6 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_count/compile_options.config: -------------------------------------------------------------------------------- 1 | # Compile configurations 2 | # Column description (columns are separated by semicolon): 3 | # (1) Identifier for compile configuration (consisting of letters) 4 | # (2) Compile options 5 | NOOPT;-std=c++11 -DPOPCOUNT_TL -O3 -g -funroll-loops -fomit-frame-pointer -ffast-math 6 | NOSSE;-std=c++11 -O3 -g -funroll-loops -fomit-frame-pointer -ffast-math 7 | SSE;-std=c++11 -msse4.2 -O3 -g -funroll-loops -fomit-frame-pointer -ffast-math 8 | HP;-std=c++11 -DUSE_HP -msse4.2 -O3 -g -funroll-loops -fomit-frame-pointer -ffast-math 9 | O1;-std=c++11 -O1 10 | O0;-std=c++11 -O0 11 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_count/index.config: -------------------------------------------------------------------------------- 1 | # This file specified sdsl index structures that are used in the benchmark. 2 | # 3 | # Each index is specified by a triple: INDEX_ID;SDSL_TYPE;INDEX_LATEX_NAME 4 | # * INDEX_ID : An identifier for the index. Only letters and underscores 5 | # are allowed in INDEX_ID. 6 | # * SDSL_TYPE : Corresponding sdsl type. 7 | # * LATEX_NAME: LaTeX name for output in the benchmark report. 8 | FM_HUFF;csa_wt,select_support_scan<>,select_support_scan<0> >,1<<20,1<<20>;FM-HF-BV 9 | FM_HUFF_RRR15;csa_wt >,1<<20,1<<20>;FM-HF-R$^{3}$-15 10 | FM_HUFF_RRR63;csa_wt >,1<<20,1<<20>;FM-HF-R$^{3}$-63 11 | #FM_HUFF_RRR127;csa_wt >,1<<20,1<<20>;FM-HF-R$^{3}$-127 12 | #FM_HUFF_RRR255;csa_wt >,1<<20,1<<20>;FM-HF-R$^{3}$-255 13 | #CSA_SADA;csa_sada,1<<20,1<<20>;CSA 14 | FM_RLMN;csa_wt,1<<20,1<<20>;FM-RLMN 15 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_count/indexes/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !HP 3 | !NOSSE 4 | !NOOPT 5 | !.gitignore 6 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_count/info/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !HP 3 | !NOSSE 4 | !NOOPT 5 | !.gitignore 6 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_count/pattern/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !HP 3 | !NOSSE 4 | !NOOPT 5 | !.gitignore 6 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_count/results/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_count/src/build_index_sdsl.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace sdsl; 6 | using namespace std; 7 | 8 | int main(int argc, char** argv) 9 | { 10 | if (argc < 4) { 11 | cout << "Usage ./" << argv[0] << " input_file tmp_dir output_file" << endl; 12 | return 0; 13 | } 14 | CSA_TYPE csa; 15 | if (argc < 3) { 16 | construct(csa, argv[1], 1); 17 | } else { 18 | // config: do not delete files, tmp_dir=argv[2], id=basename(argv[1]) 19 | cache_config cconfig(false, argv[2], util::basename(argv[1])); 20 | construct(csa, argv[1], cconfig, 1); 21 | } 22 | store_to_file(csa, argv[3]); 23 | } 24 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_count/src/info.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This program outputs the structure of an index. 3 | */ 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | using namespace sdsl; 10 | using namespace std; 11 | 12 | int main(int argc, char* argv[]) 13 | { 14 | if (argc < 2) { 15 | cout << "./" << argv[0] << " index_file " << endl; 16 | return 1; 17 | } 18 | CSA_TYPE csa; 19 | load_from_file(csa, argv[1]); 20 | write_structure(csa, cout); 21 | } 22 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_count/test_case.config: -------------------------------------------------------------------------------- 1 | # Configuration for test files 2 | # (1) Identifier for test file (consisting of letters, no `.`) 3 | # (2) Path to the test file 4 | # (3) LaTeX name 5 | # (4) Download link (if the test is available online) 6 | ENGLISH;../data/english.200MB;english.200MB;http://pizzachili.di.unipi.it/texts/nlang/english.200MB.gz 7 | DBLPXML;../data/dblp.xml.200MB;dblp.xml.200MB;http://pizzachili.di.unipi.it/texts/xml/dblp.xml.200MB.gz 8 | DNA;../data/dna.200MB;dna.200MB;http://pizzachili.di.unipi.it/texts/dna/dna.200MB.gz 9 | PROTEINS;../data/proteins.200MB;proteins.200MB;http://pizzachili.di.unipi.it/texts/protein/proteins.200MB.gz 10 | SOURCES;../data/sources.200MB;sources.200MB;http://pizzachili.di.unipi.it/texts/code/sources.200MB.gz 11 | #INFLUENZA;../data/influenza;influenza;http://pizzachili.dcc.uchile.cl/repcorpus/real/influenza.gz 12 | #EINSTEIN-de;../data/einstein.de.txt;einstein-de;http://pizzachili.dcc.uchile.cl/repcorpus/real/einstein.de.txt.gz 13 | #EINSTEIN-en;../data/einstein.en.txt;einstein-en;http://pizzachili.dcc.uchile.cl/repcorpus/real/einstein.en.txt.gz 14 | #PARA;../data/para;para;http://pizzachili.dcc.uchile.cl/repcorpus/real/para.gz 15 | #WORLDLEADER;../data/world_leaders;world-leaders;http://pizzachili.dcc.uchile.cl/repcorpus/real/world_leaders.gz 16 | #E-COLI;../data/Escherichia_Coli;E.coli;http://pizzachili.dcc.uchile.cl/repcorpus/real/Escherichia_Coli.gz 17 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_count/visualize/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !Makefile 4 | !count-footer.tex 5 | !count-header.tex 6 | !count.R 7 | !index-filter.config 8 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_count/visualize/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../Make.helper 2 | COMPILE_IDS:=$(call config_ids,../compile_options.config) 3 | TABLES = $(foreach COMPILE_ID,$(COMPILE_IDS),tbl-count-$(COMPILE_ID).tex) 4 | 5 | CONFIG_FILES=index-filter.config ../index.config ../test_case.config 6 | 7 | all: count.pdf 8 | 9 | count.pdf: count.tex 10 | @echo "Use pdflatex to generate count.pdf" 11 | @pdflatex count.tex >> LaTeX.Log 2>&1 12 | 13 | count.tex: ../results/all.txt ../../basic_functions.R count.R $(CONFIG_FILES) 14 | @echo "Use R to generate count.tex" 15 | @R --vanilla < count.R > R.log 2>&1 16 | 17 | clean: 18 | rm -f $(TABLES) count.pdf count.aux count.tex \ 19 | count.log R.log LaTeX.log 20 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_count/visualize/count-footer.tex: -------------------------------------------------------------------------------- 1 | \end{document} 2 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_count/visualize/count-header.tex: -------------------------------------------------------------------------------- 1 | \documentclass[9pt,a4paper]{scrartcl} 2 | \usepackage{booktabs} 3 | \usepackage{array} 4 | \usepackage{ragged2e} 5 | 6 | \begin{document} 7 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_count/visualize/index-filter.config: -------------------------------------------------------------------------------- 1 | # Use this file to specify which indexes are listed in the report count.pdf. 2 | # 3 | # List all the index ids which should be included in the report. Note that 4 | # the listed index ids must also be present in the file `../index.config`. 5 | # Each IDX_ID is listed on a separate line. The listing order is used 6 | # in the report. 7 | FM_HUFF 8 | FM_HUFF_RRR15 9 | FM_RLMN 10 | FM_HUFF_RRR63 11 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_extract/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_extract/index.config: -------------------------------------------------------------------------------- 1 | # Specify the extract indexes here. Use S_SA and S_ISA as generic sample parameters. 2 | # S_SA and S_ISA will be replaced by the values in sample.config 3 | # 4 | # Each index is specified by a triple: INDEX_ID;SDSL_TYPE;INDEX_LATE_NAME 5 | # * INDEX_ID : An identifier for the index. Only letters and underscores 6 | # are allowed in the name. 7 | # * SDSL_TYPE : Corresponding sdsl type. 8 | # * LATEX_NAME: LaTeX name for output in the benchmark report. 9 | FM_HUFF;csa_wt,select_support_scan<>,select_support_scan<> >,S_SA,S_ISA,text_order_sa_sampling > >;FM-HF-V5 10 | FM_HUFF_RRR15;csa_wt >,S_SA,S_ISA,text_order_sa_sampling > >;FM-HF-R$^3$15 11 | CSA_SADA;csa_sada,S_SA,S_ISA,text_order_sa_sampling > >;CSA-SADA 12 | FM_HUFF_RRR63;csa_wt >,S_SA,S_ISA,text_order_sa_sampling > >;FM-HF-R$^3$63 13 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_extract/indexes/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_extract/info/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_extract/intervals/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_extract/results/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_extract/sample.config: -------------------------------------------------------------------------------- 1 | # Specify the sample rate for suffix array (SA) and inverse suffix array (ISA). 2 | # You can use the constants SA_MAX and ISA_MAX for the maximal sparse sampling 3 | # for SA and ISA. 4 | # Each sampling pair is specified by a triple: SAMPLING_ID;SA_SAMPLE_RATE;ISA_SAMPLE_RATE 5 | # SAMPLING_ID should consist only of symbols in A-Z,a-z,0-9 6 | 4x4;4;4 7 | 8x8;8;8 8 | 16x16;16;16 9 | 32x32;32;32 10 | 64x64;64;64 11 | 128x128;128;128 12 | 256x256;256;256 13 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_extract/src/build_index_sdsl.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace sdsl; 6 | using namespace std; 7 | 8 | int main(int argc, char** argv) 9 | { 10 | if (argc < 4) { 11 | cout << "Usage ./" << argv[0] << " input_file tmp_dir output_file" << endl; 12 | return 0; 13 | } 14 | CSA_TYPE csa; 15 | if (argc < 3) { 16 | construct(csa, argv[1], 1); 17 | } else { 18 | // config: do not delete files, tmp_dir=argv[2], id=basename(argv[1]) 19 | cache_config cconfig(false, argv[2], util::basename(argv[1])); 20 | construct(csa, argv[1], cconfig, 1); 21 | } 22 | store_to_file(csa, argv[3]); 23 | } 24 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_extract/src/info.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This program outputs the structure of an index. 3 | */ 4 | #include 5 | #include 6 | 7 | using namespace sdsl; 8 | using namespace std; 9 | 10 | int main(int argc, char* argv[]) 11 | { 12 | if (argc < 2) { 13 | cout << "./" << argv[0] << " index_file " << endl; 14 | return 1; 15 | } 16 | CSA_TYPE csa; 17 | load_from_file(csa, argv[1]); 18 | write_structure(csa, cout); 19 | } 20 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_extract/test_case.config: -------------------------------------------------------------------------------- 1 | # Configuration for test files 2 | # (1) Identifier for test file (consisting of letters, no `.`) 3 | # (2) Path to the test file 4 | # (3) LaTeX name 5 | # (4) Download link (if the test is available online) 6 | ENGLISH;../data/english.200MB;english.200MB;http://pizzachili.di.unipi.it/texts/nlang/english.200MB.gz 7 | DBLPXML;../data/dblp.xml.200MB;dblp.xml.200MB;http://pizzachili.di.unipi.it/texts/xml/dblp.xml.200MB.gz 8 | DNA;../data/dna.200MB;dna.200MB;http://pizzachili.di.unipi.it/texts/dna/dna.200MB.gz 9 | PROTEINS;../data/proteins.200MB;proteins.200MB;http://pizzachili.di.unipi.it/texts/protein/proteins.200MB.gz 10 | SOURCES;../data/sources.200MB;sources.200MB;http://pizzachili.di.unipi.it/texts/code/sources.200MB.gz 11 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_extract/visualize/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !Makefile 4 | !extract.R 5 | !extract.tex 6 | !index-filter.config 7 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_extract/visualize/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../Make.helper 2 | CONFIG_FILES=index-filter.config ../index.config ../test_case.config ../sample.config 3 | 4 | all: extract.pdf 5 | 6 | extract.pdf: extract.tex tbl-extract.tex fig-extract.tex 7 | @echo "Use pdflatex to generate extract.pdf" 8 | @pdflatex extract.tex >> LaTeX.Log 2>&1 9 | 10 | tbl-extract.tex fig-extract.tex: ../../basic_functions.R extract.R $(CONFIG_FILES) ../results/all.txt 11 | @echo "Use R to generate fig-extract.tex and tbl-extract.tex" 12 | @R --vanilla < extract.R > R.log 2>&1 13 | 14 | clean: 15 | rm -f extract.pdf extract.aux extract.log R.log LaTeX.log \ 16 | tbl-extract.tex fig-extract.tex 17 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_extract/visualize/extract.tex: -------------------------------------------------------------------------------- 1 | \documentclass[9pt,a4paper]{scrartcl} 2 | \usepackage{array} 3 | \usepackage{booktabs} 4 | \usepackage{ragged2e} 5 | \usepackage{tikz} 6 | 7 | \begin{document} 8 | \pagestyle{empty} 9 | 10 | \begin{figure} 11 | \input{fig-extract.tex} 12 | \caption{Time-space trade-offs for operation extract.} 13 | \end{figure} 14 | 15 | \begin{table} 16 | \centering 17 | \input{tbl-extract.tex} 18 | \caption{Class definition of the indexes used in the experiment. 19 | The sampling rates \texttt{S\_SA} and \texttt{S\_ISA} for 20 | suffix and inverse suffix values was varied.} 21 | \end{table} 22 | 23 | \end{document} 24 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_extract/visualize/index-filter.config: -------------------------------------------------------------------------------- 1 | # Use this file to specify which indexes are listed in the report extract.pdf 2 | # and how they look like in the report. 3 | # 4 | # List all the index ids which should be included in the report. Note that 5 | # the listed index ids must also be present in the file `../index.config`. 6 | # Each INDEX_ID should be listed on a separate line followed by the style: 7 | # [pch];[lty];[col] (point type, line type, and color). 8 | FM_HUFF; 1;solid;black 9 | FM_HUFF_RRR15; 2;solid;blue 10 | CSA_SADA; 3;solid;red 11 | FM_HUFF_RRR63; 4;solid;blue 12 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_locate/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_locate/index.config: -------------------------------------------------------------------------------- 1 | # Specify the locate indexes here. Use S_SA and S_ISA as generic sample parameters. 2 | # S_SA and S_ISA will be replaced by the values in sample.config 3 | # 4 | # Each index is specified by a triple: INDEX_ID;SDSL_TYPE;INDEX_LATE_NAME 5 | # * INDEX_ID : An identifier for the index. Only letters and underscores 6 | # are allowed in the name. 7 | # * SDSL_TYPE : Corresponding sdsl type. 8 | # * LATEX_NAME: LaTeX name for output in the benchmark report. 9 | FM_HUFF;csa_wt,select_support_scan<>,select_support_scan<> >,S_SA,S_ISA,text_order_sa_sampling > >;FM-HF-V5 10 | FM_HUFF_RRR15;csa_wt >,S_SA,S_ISA,text_order_sa_sampling > >;FM-HF-R$^3$15 11 | CSA_SADA;csa_sada,S_SA,S_ISA,text_order_sa_sampling > >;CSA-SADA 12 | FM_HUFF_RRR63;csa_wt >,S_SA,S_ISA,text_order_sa_sampling > >;FM-HF-R$^3$63 13 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_locate/indexes/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !HP 3 | !NOSSE 4 | !NOOPT 5 | !.gitignore 6 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_locate/info/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !HP 3 | !NOSSE 4 | !NOOPT 5 | !.gitignore 6 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_locate/pattern/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_locate/results/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_locate/sample.config: -------------------------------------------------------------------------------- 1 | # Specify the sample rate for suffix array (SA) and inverse suffix array (ISA). 2 | # You can use the constants SA_MAX and ISA_MAX for the maximal sparse sampling 3 | # for SA and ISA. 4 | # Each sampling pair is specified by a triple: SAMPLING_ID;SA_SAMPLE_RATE;ISA_SAMPLE_RATE 5 | # SAMPLING_ID should consist only of symbols in A-Z,a-z,0-9 6 | 4x4;4;4 7 | 8x8;8;8 8 | 16x16;16;16 9 | 32x32;32;32 10 | 64x64;64;64 11 | 128x128;128;128 12 | 256x256;256;256 13 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_locate/src/build_index_sdsl.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace sdsl; 6 | using namespace std; 7 | 8 | int main(int argc, char** argv) 9 | { 10 | if (argc < 4) { 11 | cout << "Usage ./" << argv[0] << " input_file tmp_dir output_file" << endl; 12 | return 0; 13 | } 14 | CSA_TYPE csa; 15 | if (argc < 3) { 16 | construct(csa, argv[1], 1); 17 | } else { 18 | // config: do not delete files, tmp_dir=argv[2], id=basename(argv[1]) 19 | cache_config cconfig(false, argv[2], util::basename(argv[1])); 20 | construct(csa, argv[1], cconfig, 1); 21 | } 22 | store_to_file(csa, argv[3]); 23 | } 24 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_locate/src/info.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This program outputs the structure of an index. 3 | */ 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | using namespace sdsl; 10 | using namespace std; 11 | 12 | int main(int argc, char* argv[]) 13 | { 14 | if (argc < 2) { 15 | cout << "./" << argv[0] << " index_file " << endl; 16 | return 1; 17 | } 18 | CSA_TYPE csa; 19 | load_from_file(csa, argv[1]); 20 | write_structure(csa, cout); 21 | } 22 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_locate/test_case.config: -------------------------------------------------------------------------------- 1 | # Configuration for test files 2 | # (1) Identifier for test file (consisting of letters, no `.`) 3 | # (2) Path to the test file 4 | # (3) LaTeX name 5 | # (4) Download link (if the test is available online) 6 | ENGLISH;../data/english.200MB;english.200MB;http://pizzachili.di.unipi.it/texts/nlang/english.200MB.gz 7 | DBLPXML;../data/dblp.xml.200MB;dblp.xml.200MB;http://pizzachili.di.unipi.it/texts/xml/dblp.xml.200MB.gz 8 | DNA;../data/dna.200MB;dna.200MB;http://pizzachili.di.unipi.it/texts/dna/dna.200MB.gz 9 | PROTEINS;../data/proteins.200MB;proteins.200MB;http://pizzachili.di.unipi.it/texts/protein/proteins.200MB.gz 10 | SOURCES;../data/sources.200MB;sources.200MB;http://pizzachili.di.unipi.it/texts/code/sources.200MB.gz 11 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_locate/visualize/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !Makefile 4 | !index-filter.config 5 | !locate.R 6 | !locate.tex 7 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_locate/visualize/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../Make.helper 2 | CONFIG_FILES=index-filter.config ../index.config ../test_case.config ../sample.config 3 | 4 | all: locate.pdf 5 | 6 | locate.pdf: locate.tex tbl-locate.tex fig-locate.tex 7 | @echo "Use pdflatex to generate locate.pdf" 8 | @pdflatex locate.tex >> LaTeX.Log 2>&1 9 | 10 | tbl-locate.tex fig-locate.tex: ../../basic_functions.R locate.R $(CONFIG_FILES) ../results/all.txt 11 | @echo "Use R to generate tbl-locate.tex and fig-locate.tex" 12 | @R --vanilla < locate.R > R.log 2>&1 13 | 14 | clean: 15 | rm -f locate.pdf locate.aux fig-locate.tex tbl-locate.tex \ 16 | locate.log R.log LaTeX.log 17 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_locate/visualize/index-filter.config: -------------------------------------------------------------------------------- 1 | # Use this file to specify which indexes are listed in the report locate.pdf 2 | # and how they look like in the report. 3 | # 4 | # List all the index ids which should be included in the report. Note that 5 | # the listed index ids must also be present in the file `../index.config`. 6 | # Each INDEX_ID should be listed on a separate line followed by the style: 7 | # [pch];[lty];[col] (point type, line type, and color). 8 | FM_HUFF; 1;solid;black 9 | FM_HUFF_RRR15; 2;solid;blue 10 | CSA_SADA; 3;solid;red 11 | FM_HUFF_RRR63; 4;solid;blue 12 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/indexing_locate/visualize/locate.tex: -------------------------------------------------------------------------------- 1 | \documentclass[9pt,a4paper]{scrartcl} 2 | \usepackage{array} 3 | \usepackage{booktabs} 4 | \usepackage{ragged2e} 5 | \usepackage{tikz} 6 | 7 | \begin{document} 8 | \pagestyle{empty} 9 | 10 | \begin{figure} 11 | \input{fig-locate.tex} 12 | \caption{Time-space trade-offs for operation locate.} 13 | \end{figure} 14 | 15 | \begin{table} 16 | \centering 17 | \input{tbl-locate.tex} 18 | \caption{Class definition of the indexes used in the experiment. 19 | The sampling rates \texttt{S\_SA} and \texttt{S\_ISA} for 20 | suffix and inverse suffix values was varied.} 21 | \end{table} 22 | 23 | \end{document} 24 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/k2_trees/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/k2_trees/compile_options.config: -------------------------------------------------------------------------------- 1 | # Compile options 2 | -O3 -funroll-loops -fomit-frame-pointer -ffast-math -DNDEBUG 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/k2_trees/results/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/k2_trees/test_case.config: -------------------------------------------------------------------------------- 1 | # Configuration for test files 2 | # (1) Identifier for test file (consisting of letters, no `.`) 3 | # (2) Path to the test file 4 | # (3) LaTeX name 5 | # (4) Download link (if the test is available online) 6 | EXAMPLE;../data/example_arcs;examples;http://webdatacommons.org/hyperlinkgraph/data/example_arcs 7 | HOSTGRAPH;../data/hostgraph.arc;hostgraph;http://users.dcc.uchile.cl/~fmontoto/static/hostgraph.arc.gz 8 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/k2_trees/visualize/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !Makefile 4 | !k2-footer.tex 5 | !k2-header.tex 6 | !k2.R 7 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/k2_trees/visualize/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../Make.helper 2 | 3 | CONFIG_FILES= ../test_case.config 4 | 5 | all: k2.pdf 6 | 7 | k2.pdf: k2.tex 8 | @echo "Use pdflatex to generate k2.pdf" 9 | @pdflatex k2.tex >> LaTeX.Log 2>&1 10 | 11 | k2.tex: ../results/all.txt ../../basic_functions.R k2.R $(CONFIG_FILES) 12 | @echo "Use R to generate k2.tex" 13 | @R --vanilla < k2.R > R.log 2>&1 14 | 15 | clean: 16 | rm -f k2.pdf k2.aux k2.tex fig* \ 17 | k2.log R.log LaTeX.log 18 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/k2_trees/visualize/k2-footer.tex: -------------------------------------------------------------------------------- 1 | \end{document} 2 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/k2_trees/visualize/k2-header.tex: -------------------------------------------------------------------------------- 1 | \documentclass[9pt,a4paper,DIV10]{scrartcl} 2 | \usepackage{tikz} 3 | \usepackage{booktabs} 4 | \usepackage{array} 5 | \usepackage{ragged2e} 6 | \usepackage{float} 7 | 8 | \begin{document} 9 | 10 | \pagestyle{empty} 11 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/lcp/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !lcp.config 4 | !README.md 5 | !bin/ 6 | !src/ 7 | !visualize/ 8 | !compile_options.config 9 | !Makefile 10 | !results/ 11 | !test_case.config 12 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/lcp/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/lcp/compile_options.config: -------------------------------------------------------------------------------- 1 | # Compile options 2 | -O3 -funroll-loops -fomit-frame-pointer -ffast-math -DNDEBUG 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/lcp/lcp.config: -------------------------------------------------------------------------------- 1 | # This file specifies wavelettrees that are used in the benchmark. 2 | # 3 | # Each LCP algorithm is specified by a 4-tupel: LCP_ID;LCP_ALGORITHM;LCP_LATEX_NAME;BWT_NEEDED 4 | # * LCP_ID : An identifier for the index. Only letters and underscores are allowed in ID. 5 | # * LCP_ALGORITHM : Corresponding lcp alogrithm. 6 | # * LCP_LATEX_NAME: LaTeX name for output in the benchmark report. 7 | # * BWT_NEEDED : T(rue) if lcp algorithm needs bwt as input, otherwise F(alse). 8 | kasai;construct_lcp_kasai<8>;lcp-kasai;F 9 | phi_algorithm;construct_lcp_PHI<8>;lcp-$\Phi$;F 10 | semi_extern_phi;construct_lcp_semi_extern_PHI;lcp-semi-extern-$\Phi$;F 11 | go;construct_lcp_go;lcp-go;T 12 | goPhi;construct_lcp_goPHI;lcp-go-$\Phi$;T 13 | bwtb;construct_lcp_bwt_based;lcp-bwt-based;T 14 | bwtb2;construct_lcp_bwt_based2;lcp-bwt-based2;T 15 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/lcp/results/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/lcp/src/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !create_lcp.cpp 4 | !create_sa_bwt.cpp 5 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/lcp/src/create_lcp.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace sdsl; 9 | using namespace std; 10 | using namespace std::chrono; 11 | 12 | #define S(x) #x 13 | #define SX(x) S(x) 14 | 15 | int main() 16 | { 17 | memory_monitor::start(); 18 | string dir = "."; 19 | string id = "tmp"; 20 | cache_config config(false, dir, id); 21 | 22 | register_cache_file(conf::KEY_TEXT, config); 23 | register_cache_file(conf::KEY_SA, config); 24 | register_cache_file(conf::KEY_BWT, config); 25 | 26 | auto start = high_resolution_clock::now(); 27 | LCP_TYPE(config); 28 | auto stop = high_resolution_clock::now(); 29 | memory_monitor::stop(); 30 | cout << "# " SX(LCPID) "_TIME = " << duration_cast(stop-start).count()/(double)1000 << endl; 31 | cout << "# " SX(LCPID) "_MMPEAK = "<< memory_monitor::peak() << endl; 32 | 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/lcp/test_case.config: -------------------------------------------------------------------------------- 1 | # Configuration for test files 2 | # (1) Identifier for test file (consisting of letters, no `.`) 3 | # (2) Path to the test file 4 | # (3) LaTeX name 5 | # (4) Download link (if the test is available online) 6 | ENGLISH;../data/english.200MB;english.200MB;http://pizzachili.di.unipi.it/texts/nlang/english.200MB.gz 7 | DBLPXML;../data/dblp.xml.200MB;dblp.xml.200MB;http://pizzachili.di.unipi.it/texts/xml/dblp.xml.200MB.gz 8 | DNA;../data/dna.200MB;dna.200MB;http://pizzachili.di.unipi.it/texts/dna/dna.200MB.gz 9 | PROTEINS;../data/proteins.200MB;proteins.200MB;http://pizzachili.di.unipi.it/texts/protein/proteins.200MB.gz 10 | SOURCES;../data/sources.200MB;sources.200MB;http://pizzachili.di.unipi.it/texts/code/sources.200MB.gz 11 | INFLUENZA;../data/influenza;influenza;http://pizzachili.dcc.uchile.cl/repcorpus/real/influenza.gz 12 | EINSTEIN-de;../data/einstein.de.txt;einstein-de;http://pizzachili.dcc.uchile.cl/repcorpus/real/einstein.de.txt.gz 13 | EINSTEIN-en;../data/einstein.en.txt;einstein-en;http://pizzachili.dcc.uchile.cl/repcorpus/real/einstein.en.txt.gz 14 | PARA;../data/para;para;http://pizzachili.dcc.uchile.cl/repcorpus/real/para.gz 15 | WORLDLEADER;../data/world_leaders;world-leaders;http://pizzachili.dcc.uchile.cl/repcorpus/real/world_leaders.gz 16 | E-COLI;../data/Escherichia_Coli;E.coli;http://pizzachili.dcc.uchile.cl/repcorpus/real/Escherichia_Coli.gz 17 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/lcp/visualize/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !Makefile 4 | !lcp-header.tex 5 | !lcp-footer.tex 6 | !lcp.R 7 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/lcp/visualize/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../Make.helper 2 | 3 | CONFIG_FILES= ../test_case.config 4 | 5 | all: lcp.pdf 6 | 7 | lcp.pdf: lcp.tex 8 | @echo "Use pdflatex to generate lcp.pdf" 9 | @pdflatex lcp.tex >> LaTeX.Log 2>&1 10 | 11 | lcp.tex: ../results/all.txt ../../basic_functions.R lcp.R $(CONFIG_FILES) 12 | @echo "Use R to generate lcp.tex" 13 | @R --vanilla < lcp.R > R.log 2>&1 14 | 15 | clean: 16 | rm -f lcp.pdf lcp.aux lcp.tex fig* \ 17 | lcp.log R.log LaTeX.log 18 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/lcp/visualize/lcp-footer.tex: -------------------------------------------------------------------------------- 1 | \end{document} 2 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/lcp/visualize/lcp-header.tex: -------------------------------------------------------------------------------- 1 | \documentclass[9pt,a4paper,DIV10]{scrartcl} 2 | \usepackage{booktabs} 3 | \usepackage{array} 4 | \usepackage{ragged2e} 5 | 6 | \begin{document} 7 | 8 | \pagestyle{empty} 9 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/rrr_vector/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/rrr_vector/block_size.config: -------------------------------------------------------------------------------- 1 | # Specify block sizes in [0..255] for which rrr_vector should be tested. 2 | # Each block size on one line. Default initialization is generated by 3 | # 4 | 5 5 | 7 6 | 8 7 | 9 8 | 11 9 | 14 10 | 15 11 | 16 12 | 26 13 | 31 14 | 32 15 | 46 16 | 56 17 | 63 18 | 64 19 | 84 20 | 104 21 | 124 22 | 127 23 | 128 24 | 168 25 | 208 26 | 248 27 | 255 28 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/rrr_vector/compile_options.config: -------------------------------------------------------------------------------- 1 | # Compile configurations 2 | # Column description (columns are separated by semicolon): 3 | # (1) Identifier for compile configuration (consisting of letters) 4 | # (2) Compile options 5 | O3;-msse4.2 -O3 -funroll-loops -fomit-frame-pointer -ffast-math -DNDEBUG 6 | #NOOPT;-DRRR_NO_OPT -msse4.2 -O3 -funroll-loops -fomit-frame-pointer -ffast-math -DNDEBUG 7 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/rrr_vector/results/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/rrr_vector/test_case.config: -------------------------------------------------------------------------------- 1 | # Configuration for test files 2 | # (1) Identifier for test file (consisting of letters, no `.`) 3 | # (2) Path to the test file 4 | # (3) LaTeX name 5 | # (4) Download link (if not generated automatically, like rnd_X.Y) 6 | RND50-16M;../data/rnd_50.16MB;rnd-50.16M; 7 | WT-DNA-16MB;../data/WT-DNA-16MB;wt-dna.16M;http://people.eng.unimelb.edu.au/sgog/data/WT-DNA-16MB.gz 8 | WT-WEB-16MB;../data/WT-WEB-16MB;wt-web.16M;http://people.eng.unimelb.edu.au/sgog/data/WT-WEB-16MB.gz 9 | WT-DNA-1GB;../data/WT-DNA-1GB;wt-dna.1G;http://people.eng.unimelb.edu.au/sgog/data/WT-DNA-1GB.gz 10 | WT-WEB-1GB;../data/WT-WEB-1GB;wt-web.1G;http://people.eng.unimelb.edu.au/sgog/data/WT-WEB-1GB.gz 11 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/rrr_vector/visualize/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !Makefile 4 | !rrr-footer.tex 5 | !rrr-header.tex 6 | !rrr.R 7 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/rrr_vector/visualize/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../Make.helper 2 | 3 | CONFIG_FILES= ../test_case.config 4 | 5 | all: rrr.pdf 6 | 7 | rrr.pdf: rrr.tex 8 | @echo "Use pdflatex to generate rrr.pdf" 9 | @pdflatex rrr.tex >> LaTeX.Log 2>&1 10 | 11 | rrr.tex: ../results/all.txt ../../basic_functions.R rrr.R $(CONFIG_FILES) 12 | @echo "Use R to generate rrr.tex" 13 | @R --vanilla < rrr.R > R.log 2>&1 14 | 15 | clean: 16 | rm -f rrr.pdf rrr.aux rrr.tex fig-rrr* \ 17 | rrr.log R.log LaTeX.log 18 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/rrr_vector/visualize/rrr-footer.tex: -------------------------------------------------------------------------------- 1 | \end{document} 2 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/rrr_vector/visualize/rrr-header.tex: -------------------------------------------------------------------------------- 1 | \documentclass[9pt,a4paper]{scrartcl} 2 | \usepackage{tikz} 3 | 4 | \begin{document} 5 | 6 | \pagestyle{empty} 7 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/self_delimiting_codes/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/self_delimiting_codes/compile_options.config: -------------------------------------------------------------------------------- 1 | # Compile options 2 | -O3 -funroll-loops -fomit-frame-pointer -ffast-math -DNDEBUG 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/self_delimiting_codes/results/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/self_delimiting_codes/vectors.config: -------------------------------------------------------------------------------- 1 | # This file specifies integer vectors that are used in the benchmark. 2 | # (1) Identifier for test file (consisting of letters, no `.`) 3 | # (2) Integer Vector sdsl-type (no whitespaces) 4 | # (3) LaTeX name of testet Vector (no whitespaces) 5 | # VLC Vectors 6 | VLC_EG;vlc_vector;VLC-Elias-Gamma 7 | VLC_ED;vlc_vector;VLC-Elias-Delta 8 | VLC_FIB;vlc_vector;VLC-Fibonacci 9 | VLC_C2;vlc_vector>;VLC-Comma-Base3 10 | #VLC_C3;vlc_vector>;VLC-Comma-Base7 11 | #VLC_C8;vlc_vector>;VLC-Comma-Base254 12 | # ENC Vectors 13 | ENC_EG;enc_vector;ENC-Elias-Gamma 14 | ENC_ED;enc_vector;ENC-Elias-Delta 15 | ENC_FIB;enc_vector;ENC-Fibonacci 16 | ENC_C2;enc_vector>;ENC-Comma-Base3 17 | #ENC_C3;enc_vector>;ENC-Comma-Base7 18 | #ENC_C8;enc_vector>;ENC-Comma-Base254 19 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/self_delimiting_codes/visualize/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile will also automatically generate a tex file with system information 2 | 3 | #utility 4 | empty:= 5 | space:= $(empty) $(empty) 6 | 7 | auto: self_delimiting_codes.pdf 8 | 9 | self_delimiting_codes.pdf: ../results/result.csv ../results/tc.csv ../results/vat.csv 10 | $(eval CPUINFO := $(strip $(patsubst \\%, $(space),\ 11 | $(shell cat /proc/cpuinfo | grep "model name.*" | uniq | cut -d':' -f 2)))) 12 | $(eval MEMINFO := $(strip \ 13 | $(firstword $(shell free -k | grep "Mem.*" | uniq | cut -d':' -f 2)))) 14 | $(eval MEMINFO := $(addsuffix " KB", $(MEMINFO))) 15 | $(eval DISTINFO := $(strip $(patsubst \\%, $(space),\ 16 | $(shell cat /etc/issue)))) 17 | @echo "Creating system information file" 18 | @echo "\\\\begin{tabular}{ll}" > sysinfo.tex 19 | @echo "\\\\toprule" >> sysinfo.tex 20 | @echo "CPU & \\\\verb\\\\$(CPUINFO)\\\\ \\\\\\\\" >> sysinfo.tex 21 | @echo "Total Memory & \\\\verb\\\\$(MEMINFO)\\\\ \\\\\\\\" >> sysinfo.tex 22 | @echo "Distribution & \\\\verb\\\\$(DISTINFO)\\\\ \\\\\\\\" >> sysinfo.tex 23 | @echo "\\\\bottomrule" >> sysinfo.tex 24 | @echo "\\\\end{tabular}" >> sysinfo.tex 25 | @echo "Use pdflatex to generate self_delimiting_codes.pdf" 26 | @pdflatex self_delimiting_codes.tex >> LaTeX.log 2>&1 27 | 28 | cleanall: 29 | rm -f self_delimiting_codes.pdf self_delimiting_codes.aux \ 30 | self_delimiting_codes.log LaTeX.log sysinfo.tex 31 | 32 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/suffix_trees/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/suffix_trees/compile_options.config: -------------------------------------------------------------------------------- 1 | # Compile configurations 2 | # Column description (columns are separated by semicolon): 3 | # (1) Identifier for compile configuration (consisting of letters) 4 | # (2) Compile options 5 | O3;-O3 -ffast-math -funroll-loops 6 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/suffix_trees/index.config: -------------------------------------------------------------------------------- 1 | # This file specified fully compressed suffix tree implementations that are 2 | # used in the benchmark. 3 | # 4 | # Each index is specified by a triple: INDEX_ID;SDSL_TYPE;INDEX_LATEX_NAME 5 | # * INDEX_ID : An identifier for the index. Only letters and underscores 6 | # are allowed in INDEX_ID. 7 | # * SDSL_TYPE : Corresponding sdsl type of index under test. 8 | # * LATEX_NAME : LaTeX name for output in the benchmark report. 9 | SCT3;cst_sct3 >, 32, 32, text_order_sa_sampling<>, text_order_isa_sampling_support<> > >;\texttt{cst\_sct3} 10 | SADA;cst_sada >, 32, 32, text_order_sa_sampling<>, text_order_isa_sampling_support<> > >;\texttt{cst\_sada} 11 | FULLY;cst_fully >, 32, 32, text_order_sa_sampling<>, text_order_isa_sampling_support<> > >;\texttt{cst\_fully} 12 | 13 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/suffix_trees/index_int.config: -------------------------------------------------------------------------------- 1 | # This file specified fully compressed suffix tree implementations that are 2 | # used in the benchmark. 3 | # 4 | # Each index is specified by a triple: INDEX_ID;SDSL_TYPE;INDEX_LATEX_NAME 5 | # * INDEX_ID : An identifier for the index. Only letters and underscores 6 | # are allowed in INDEX_ID. 7 | # * SDSL_TYPE : Corresponding sdsl type of index under test. 8 | # * LATEX_NAME : LaTeX name for output in the benchmark report. 9 | SCT3;cst_sct3 >, 32, 32, text_order_sa_sampling<>, text_order_isa_sampling_support<> > >;\texttt{cst\_sct3} 10 | SADA;cst_sada >, 32, 32, text_order_sa_sampling<>, text_order_isa_sampling_support<> > >;\texttt{cst\_sada} 11 | FULLY;cst_fully >, 32, 32, text_order_sa_sampling<>, text_order_isa_sampling_support<> > >;\texttt{cst\_fully} 12 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/suffix_trees/indexes/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/suffix_trees/results/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/suffix_trees/stats/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/suffix_trees/test_case_int.config: -------------------------------------------------------------------------------- 1 | # Configuration for test files 2 | # (1) Identifier for test file (consisting of letters, no `.`) 3 | # (2) Path to the test file 4 | # (3) LaTeX name 5 | # (4) Download link (if not generated automatically, like rnd_X.Y) 6 | #ENWIKISMLINT;../data/text_int_SURF.sdsl;Wiki;http://algo2.iti.kit.edu/gog/projects/ALENEX15/collections/ENWIKISMLINT/text_int_SURF.sdsl 7 | #ENWIKISMLINT;../data/text_int_SURF.sdsl;Wiki;http://christianocker.com/texts/wiki/text_int_SURF.sdsl.gz 8 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/suffix_trees/visualize/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | *.aux 3 | *.tex 4 | *.pdf 5 | !suffix_trees.tex 6 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/suffix_trees/visualize/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../Make.helper 2 | 3 | CONFIG_FILES=../test_case.config 4 | 5 | all: suffix_trees.pdf 6 | 7 | suffix_trees.pdf: suffix_trees.tex 8 | @echo "Use pdflatex to generate suffix_trees.pdf" 9 | @pdflatex suffix_trees.tex >> LaTeX.log 2>&1 10 | 11 | suffix_trees.tex: ../results/all.txt ../../basic_functions.R suffix_trees.R $(CONFIG_FILES) 12 | @echo "Use R to generate tex files." 13 | @R --vanilla < suffix_trees.R > R.log 2>&1 14 | 15 | graph_data: ../results/all.txt ../../basic_functions.R graph_data.R $(CONFIG_FILES) 16 | @echo "Use R to generate raw graph data." 17 | @R --vanilla < graph_data.R > R.log 2>&1 18 | 19 | clean: 20 | rm -f suffix_trees.pdf suffix_trees.aux suffix_trees.log fig-space.tex fig-time.tex R.log LaTeX.log 21 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/suffix_trees/visualize/output/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/suffix_trees/visualize/suffix_trees.tex: -------------------------------------------------------------------------------- 1 | \documentclass[9pt,a4paper]{scrartcl} 2 | \begin{document} 3 | \pagestyle{empty} 4 | 5 | \begin{table} 6 | \centering 7 | \input{fig-space.tex} 8 | \caption{Space Requirements of CSTs.} 9 | \end{table} 10 | 11 | \begin{table} 12 | \centering 13 | \input{fig-time.tex} 14 | \caption{Query times of CSTs, in microseconds.} 15 | \end{table} 16 | 17 | \end{document} 18 | 19 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/tmp/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/wavelet_trees/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/wavelet_trees/compile_options.config: -------------------------------------------------------------------------------- 1 | # Compile options 2 | -O3 -funroll-loops -fomit-frame-pointer -ffast-math -DNDEBUG 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/wavelet_trees/results/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/wavelet_trees/visualize/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !Makefile 4 | !wt-footer.tex 5 | !wt-header.tex 6 | !wt.R 7 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/wavelet_trees/visualize/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../Make.helper 2 | 3 | CONFIG_FILES= ../test_case.config 4 | 5 | all: wt.pdf 6 | 7 | wt.pdf: wt.tex 8 | @echo "Use pdflatex to generate wt.pdf" 9 | @pdflatex wt.tex >> LaTeX.Log 2>&1 10 | 11 | wt.tex: ../results/all.txt ../../basic_functions.R wt.R $(CONFIG_FILES) 12 | @echo "Use R to generate wt.tex" 13 | @R --vanilla < wt.R > R.log 2>&1 14 | 15 | clean: 16 | rm -f wt.pdf wt.aux wt.tex fig* \ 17 | wt.log R.log LaTeX.log 18 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/wavelet_trees/visualize/wt-footer.tex: -------------------------------------------------------------------------------- 1 | \end{document} 2 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/benchmark/wavelet_trees/visualize/wt-header.tex: -------------------------------------------------------------------------------- 1 | \documentclass[9pt,a4paper,DIV10]{scrartcl} 2 | \usepackage{tikz} 3 | \usepackage{booktabs} 4 | \usepackage{array} 5 | \usepackage{ragged2e} 6 | \usepackage{float} 7 | 8 | \begin{document} 9 | 10 | \pagestyle{empty} 11 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/build/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !build.sh 4 | !clean.sh 5 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/build/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | CUR_DIR=`pwd` 3 | OLD_DIR="$( cd "$( dirname "$0" )" && pwd )" # gets the directory where the script is located in 4 | cd "${OLD_DIR}" 5 | 6 | cmake .. -DCMAKE_INSTALL_PREFIX=${HOME} && make install 7 | 8 | cd ${CUR_DIR} 9 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/build/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # activate globbing 3 | shopt -s extglob 4 | # removes all but the listed files in the directory 5 | # and subdirectories 6 | rm -rf !(build.sh|clean.sh|.gitignore|..|.) 7 | 8 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/examples/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !*.cpp 3 | !Makefile 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/examples/Makefile: -------------------------------------------------------------------------------- 1 | include ../Make.helper 2 | CXX_FLAGS=$(MY_CXX_FLAGS) $(MY_CXX_OPT_FLAGS) -I$(INC_DIR) -L$(LIB_DIR) 3 | CCLIB=-lsdsl -ldivsufsort -ldivsufsort64 4 | SOURCES=$(wildcard *.cpp) 5 | EXECS=$(SOURCES:.cpp=.x) 6 | 7 | all: $(EXECS) 8 | 9 | build-test: $(EXECS) 10 | 11 | %.x:%.cpp 12 | $(MY_CXX) $(CXX_FLAGS) -o $@ $< $(CCLIB) 13 | 14 | clean: 15 | rm -f $(EXECS) 16 | rm -rf *.dSYM 17 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/examples/bit-vector.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | 10 | bit_vector b(10000000, 0); 11 | b[8] = 1; 12 | rank_support_v<> rb(&b); 13 | 14 | cout< rrrb(b); 21 | rrr_vector<127>::rank_1_type rank_rrrb(&rrrb); 22 | cout<::select_1_type select_rrrb(&rrrb); 30 | cout<<"position of first one in b: "< v(100, 5, 7); 36 | 37 | cout<<"v[5]="< 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | using namespace sdsl; 7 | 8 | typedef cst_sct3<> cst_t; 9 | 10 | int main(int argc, char* argv[]) 11 | { 12 | if (argc < 2) { 13 | cout << "usage: "< iterator; 21 | iterator begin = iterator(&cst, cst.root()); 22 | iterator end = iterator(&cst, cst.root(), true, true); 23 | 24 | for (iterator it = begin; it != end; ++it) { 25 | std::cout << cst.depth(*it) << "-[" << cst.lb(*it) << "," << cst.rb(*it) << "]" << std::endl; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/examples/cst-node-child-iterator.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | using namespace sdsl; 7 | 8 | typedef cst_sct3<> cst_t; 9 | typedef cst_sada<> csts_t; 10 | 11 | int main(int argc, char* argv[]) 12 | { 13 | if (argc < 2) { 14 | cout << "usage: "<(stop-start).count() << endl; 20 | cout << "sum="<" << endl; 27 | cout << " (1) Creates a CST for a byte file. " << endl; 28 | cout << " (2) Runs a benchmark with enabled/disabled hugepages." << endl; 29 | return 1; 30 | } 31 | 32 | if (argc==3) { 33 | // memory_manager::use_hugepages(500ULL*1024ULL*1024ULL); 34 | // use all available hugepages if nothing is specified 35 | memory_manager::use_hugepages(); 36 | } 37 | 38 | cst_sct3<> cst; 39 | auto start = timer::now(); 40 | construct(cst, argv[1], 1); 41 | auto stop = timer::now(); 42 | cout << "construction time in seconds: " << duration_cast(stop-start).count() << endl; 43 | do_something(cst); // before it is mapped 44 | } 45 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/examples/int-vector-buffer-iterator.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace sdsl; 6 | using namespace std; 7 | 8 | int main() 9 | { 10 | string file = "int_vector_buffer_iterator.sdsl"; 11 | { 12 | int_vector<> iv = {1,2,3,4,5,9,8,7,6}; 13 | store_to_file(iv, file); 14 | } 15 | int_vector_buffer<> ivb(file); 16 | cout << std::accumulate(ivb.begin(), ivb.end(), 0) << endl; 17 | cout << std::count_if(ivb.begin(), ivb.end(), [](uint64_t x) { 18 | return 0 == x%2; 19 | }) << endl; 20 | } 21 | 22 | 23 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/examples/int-vector-entry.cpp: -------------------------------------------------------------------------------- 1 | //! Program for debugging. Load vector v of type int_vector<> from 2 | // file argv[1]. Then the program outputs for each integer i, 3 | // which is read from stdin, the value v[i]. 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace std; 9 | using namespace sdsl; 10 | 11 | int main(int argc, char* argv[]) 12 | { 13 | if (argc < 2) { 14 | cout << "Usage: " << argv[0] << " file [lb] [rb]" << endl; 15 | cout << " Reads a serialized int_vector<> from disk." < v; 20 | load_from_file(v, argv[1]); 21 | cout<<"loaded int_vector<> containing "<3) { 24 | size_t a=stoull(argv[2]);; 25 | size_t b=stoull(argv[3]); 26 | if (b >= v.size()) 27 | b = v.size()-1; 28 | if (a > b) 29 | a = b; 30 | for (size_t i=a; i<=b; ++i) { 31 | cout<<"v["<>i) { 37 | cout<<"v["< 2 | #include 3 | 4 | using namespace sdsl; 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | wt_int<> wt; 10 | //0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 11 | construct_im(wt, int_vector<> {1,2,2,4,5,3,2,4,5,3,2,4,7,4,2,52,7,4,2,1,5,74,3}); 12 | 13 | cout << "wt = " << wt << endl; 14 | cout << "wt[0,3] intersect with wt[7,10]" << endl; 15 | auto res = intersect(wt, {{0,3},{7,10}}); 16 | cout << "element : sum of occurrences in ranges" << endl; 17 | for (auto x : res) { 18 | cout << x.first << " : " << x.second < 2 | #include 3 | 4 | using namespace sdsl; 5 | using namespace std; 6 | 7 | template 8 | void output_node(const typename t_cst::node_type& v, const t_cst& cst) 9 | { 10 | cout << cst.depth(v) << "-[" << cst.lb(v) << "," 11 | << cst.rb(v) << "]" << endl; 12 | } 13 | 14 | template 15 | void run() 16 | { 17 | t_cst cst; 18 | construct_im(cst, "ananas", 1); 19 | for (auto v : cst) { 20 | output_node(v, cst); 21 | } 22 | cout<<"--"<>(); 38 | run>(); 39 | } 40 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/examples/standalone_lcp.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | using namespace sdsl; 7 | 8 | int main(int argc, char* argv[]) 9 | { 10 | if (argc < 2) { 11 | cout << "Usage: " << argv[0] << " file" << endl; 12 | return 1; 13 | } 14 | string file = argv[1]; 15 | 16 | cache_config cc(false); // do not delete temp files after csa construction 17 | csa_wt<> csa; 18 | construct(csa, file, 1); 19 | 20 | cc.delete_files = true; // delete temp files after lcp construction 21 | lcp_wt<> lcp; 22 | construct(lcp, file, 1); 23 | 24 | if (csa.size() < 1000) { 25 | cout << csa << endl; 26 | cout << "-------" << endl; 27 | cout << lcp << endl; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/examples/storage-visualization.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using timer = std::chrono::high_resolution_clock; 7 | using namespace std::chrono; 8 | using namespace sdsl; 9 | 10 | int main(int argc, char** argv) 11 | { 12 | if (argc < 2) { 13 | std::cout << "Usage: " << argv[0] << " file" << std::endl; 14 | std::cout << " Creates a CST for a byte file and visualizes the space used by the data structure." << std::endl; 15 | return 1; 16 | } 17 | cst_sct3<> cst; 18 | auto start = timer::now(); 19 | std::cout << "constructing cst..." << std::endl; 20 | construct(cst, argv[1], 1); 21 | std::cout << "construction cst time in seconds: " << duration_cast(timer::now()-start).count() << std::endl; 22 | 23 | std::ofstream ofs("cst-space-usage.html"); 24 | std::cout << "writing storage visualization to cst-space-usage.html" << std::endl; 25 | sdsl::write_structure(cst,ofs); 26 | } 27 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/examples/store_to_file.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace sdsl; 6 | using namespace std; 7 | 8 | int main() 9 | { 10 | cout << (has_serialize::value) << endl; 11 | cout << (has_serialize::value) << endl; 12 | 13 | { 14 | ofstream out("data.sdsl"); 15 | bit_vector b = {1,0,0,0,1,1,0}; 16 | serialize(b, out); 17 | } 18 | { 19 | ifstream in("data.sdsl"); 20 | bit_vector b; 21 | load(b, in); 22 | cout << b << endl; 23 | } 24 | { 25 | uint64_t x = 42; 26 | store_to_file(x, "data.sdsl"); 27 | } 28 | { 29 | uint64_t x = 0; 30 | load_from_file(x, "data.sdsl"); 31 | cout << x << endl; 32 | } 33 | { 34 | std::vector x(10, 5); 35 | store_to_file(x, "data.sdsl"); 36 | } 37 | { 38 | std::vector x; 39 | load_from_file(x, "data.sdsl"); 40 | cout << x.size() << endl; 41 | for (size_t i=0; i 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | typedef cst_sct3<> cst_t; 8 | typedef cst_t::char_type char_type; 9 | 10 | int main(int argc, char* argv[]) 11 | { 12 | if (argc < 2) { 13 | cout << "Usage: "<< argv[0] << " file" << endl; 14 | cout << "(1) Generates the CST of file." << endl; 15 | cout << "(2) Calculates the avg LCP value and the runs in the BWT." << endl; 16 | return 1; 17 | } 18 | cst_t cst; 19 | construct(cst, argv[1], 1); 20 | 21 | long double runs = 1; 22 | long double avg_lcp = 0; 23 | if (cst.csa.size()) { 24 | char_type prev_bwt = cst.csa.bwt[0]; 25 | for (uint64_t i=1; i 2 | #include 3 | #include 4 | 5 | using namespace sdsl; 6 | using namespace std; 7 | 8 | int main() 9 | { 10 | csa_wt<> csa; 11 | construct_im(csa, "This is how it works", 1); 12 | // write only one object to std::cout 13 | write_structure(csa, cout); 14 | wt_int<> wt; 15 | construct_im(wt, int_vector<>(1000,3)); 16 | // write multiple objects into one file 17 | { 18 | ofstream out("write_structure.html"); 19 | write_structure(out, csa, wt); 20 | } 21 | // write one object into a file 22 | write_structure(csa, "csa_structure.html"); 23 | } 24 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/examples/wt_ap.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace sdsl; 4 | using namespace std; 5 | 6 | int main(int argc, char* argv[]) 7 | { 8 | if (argc < 2) { 9 | return 1; 10 | } 11 | wt_ap<> wt; 12 | memory_monitor::start(); 13 | construct(wt, argv[1], 1); 14 | memory_monitor::stop(); 15 | { 16 | std::ofstream csaofs("wt-construction.html"); 17 | cout << "writing memory usage visualization to csa-construction.html\n"; 18 | memory_monitor::write_memory_log(csaofs); 19 | } 20 | { 21 | std::ofstream out("wt-space.html"); 22 | write_structure(wt,out); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/external/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ## Add libdivsufsort 2 | set(divsufsort_cmake_file ${CMAKE_CURRENT_LIST_DIR}/libdivsufsort/CMakeLists.txt) 3 | if(NOT EXISTS ${divsufsort_cmake_file}) 4 | EXECUTE_PROCESS(COMMAND git submodule update --init external/libdivsufsort 5 | WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/.. 6 | OUTPUT_QUIET 7 | ) 8 | endif(NOT EXISTS ${divsufsort_cmake_file}) 9 | 10 | set(BUILD_SHARED_LIBS OFF CACHE BOOL "Do not build a shared library for libdivsufsort") 11 | set(BUILD_EXAMPLES OFF CACHE BOOL "Do not build libdivsufsort example") 12 | set(BUILD_DIVSUFSORT64 ON CACHE BOOL "Build libdivsufsort in 64-bits mode") 13 | 14 | add_subdirectory(libdivsufsort) 15 | 16 | ## Add gtest 17 | set(gtest_dir ${CMAKE_CURRENT_LIST_DIR}/googletest) 18 | set(gtest_file ${gtest_dir}/CMakeLists.txt) 19 | if(NOT EXISTS ${gtest_file}) 20 | EXECUTE_PROCESS(COMMAND git submodule update --init external/googletest 21 | WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/.. 22 | OUTPUT_QUIET 23 | ) 24 | endif(NOT EXISTS ${gtest_file}) 25 | 26 | # add_subdirectory(googletest/googletest) 27 | 28 | 29 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/external/libdivsufsort/.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | *.ko 4 | *.obj 5 | *.elf 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Libraries 12 | *.lib 13 | *.a 14 | *.la 15 | *.lo 16 | 17 | # Shared objects (inc. Windows DLLs) 18 | *.dll 19 | *.so 20 | *.so.* 21 | *.dylib 22 | 23 | # Executables 24 | *.exe 25 | *.out 26 | *.app 27 | *.i*86 28 | *.x86_64 29 | *.hex 30 | 31 | # CMake files/directories 32 | build/ 33 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/external/libdivsufsort/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # libdivsufsort Change Log 2 | 3 | See full changelog at: https://github.com/y-256/libdivsufsort/commits 4 | 5 | ## [2.0.1] - 2010-11-11 6 | ### Fixed 7 | * Wrong variable used in `divbwt` function 8 | * Enclose some string variables with double quotation marks in include/CMakeLists.txt 9 | * Fix typo in include/CMakeLists.txt 10 | 11 | ## 2.0.0 - 2008-08-23 12 | ### Changed 13 | * Switch the build system to [CMake](http://www.cmake.org/) 14 | * Improve the performance of the suffix-sorting algorithm 15 | 16 | ### Added 17 | * OpenMP support 18 | * 64-bit version of divsufsort 19 | 20 | [Unreleased]: https://github.com/y-256/libdivsufsort/compare/2.0.1...HEAD 21 | [2.0.1]: https://github.com/y-256/libdivsufsort/compare/2.0.0...2.0.1 22 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/external/libdivsufsort/CMakeModules/CheckFunctionKeywords.cmake: -------------------------------------------------------------------------------- 1 | include(CheckCSourceCompiles) 2 | 3 | macro(check_function_keywords _wordlist) 4 | set(${_result} "") 5 | foreach(flag ${_wordlist}) 6 | string(REGEX REPLACE "[-+/ ()]" "_" flagname "${flag}") 7 | string(TOUPPER "${flagname}" flagname) 8 | set(have_flag "HAVE_${flagname}") 9 | check_c_source_compiles("${flag} void func(); void func() { } int main() { func(); return 0; }" ${have_flag}) 10 | if(${have_flag} AND NOT ${_result}) 11 | set(${_result} "${flag}") 12 | # break() 13 | endif(${have_flag} AND NOT ${_result}) 14 | endforeach(flag) 15 | endmacro(check_function_keywords) 16 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/external/libdivsufsort/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2003 Yuta Mori All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/external/libdivsufsort/VERSION.cmake: -------------------------------------------------------------------------------- 1 | set(PROJECT_VERSION_MAJOR "2") 2 | set(PROJECT_VERSION_MINOR "0") 3 | set(PROJECT_VERSION_PATCH "2") 4 | set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") 5 | set(PROJECT_VERSION_FULL "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") 6 | 7 | set(LIBRARY_VERSION "3.0.1") 8 | set(LIBRARY_SOVERSION "3") 9 | 10 | ## Git revision number ## 11 | if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") 12 | execute_process(COMMAND git describe --tags HEAD 13 | WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" 14 | OUTPUT_VARIABLE GIT_DESCRIBE_TAGS ERROR_QUIET) 15 | if(GIT_DESCRIBE_TAGS) 16 | string(REGEX REPLACE "^v(.*)" "\\1" GIT_REVISION "${GIT_DESCRIBE_TAGS}") 17 | string(STRIP "${GIT_REVISION}" GIT_REVISION) 18 | if(GIT_REVISION) 19 | set(PROJECT_VERSION_FULL "${GIT_REVISION}") 20 | endif(GIT_REVISION) 21 | endif(GIT_DESCRIBE_TAGS) 22 | endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") 23 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/external/libdivsufsort/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ## Add definitions ## 2 | add_definitions(-D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64) 3 | 4 | ## Targets ## 5 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include" 6 | "${CMAKE_CURRENT_BINARY_DIR}/../include") 7 | link_directories("${CMAKE_CURRENT_BINARY_DIR}/../lib") 8 | foreach(src suftest mksary sasearch bwt unbwt) 9 | add_executable(${src} ${src}.c) 10 | target_link_libraries(${src} divsufsort) 11 | endforeach(src) 12 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/external/libdivsufsort/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include" 2 | "${CMAKE_CURRENT_BINARY_DIR}/../include") 3 | 4 | set(divsufsort_SRCS divsufsort.c sssort.c trsort.c utils.c) 5 | 6 | ## libdivsufsort ## 7 | add_library(divsufsort ${divsufsort_SRCS}) 8 | install(TARGETS divsufsort 9 | RUNTIME DESTINATION ${CMAKE_INSTALL_RUNTIMEDIR} 10 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} 11 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) 12 | set_target_properties(divsufsort PROPERTIES 13 | VERSION "${LIBRARY_VERSION}" 14 | SOVERSION "${LIBRARY_SOVERSION}" 15 | DEFINE_SYMBOL DIVSUFSORT_BUILD_DLL 16 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../examples") 17 | 18 | ## libdivsufsort64 ## 19 | if(BUILD_DIVSUFSORT64) 20 | add_library(divsufsort64 ${divsufsort_SRCS}) 21 | install(TARGETS divsufsort64 22 | RUNTIME DESTINATION ${CMAKE_INSTALL_RUNTIMEDIR} 23 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} 24 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) 25 | set_target_properties(divsufsort64 PROPERTIES 26 | VERSION "${LIBRARY_VERSION}" 27 | SOVERSION "${LIBRARY_SOVERSION}" 28 | DEFINE_SYMBOL DIVSUFSORT_BUILD_DLL 29 | COMPILE_FLAGS "-DBUILD_DIVSUFSORT64" 30 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../examples") 31 | endif(BUILD_DIVSUFSORT64) 32 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/external/libdivsufsort/pkgconfig/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ## generate libdivsufsort.pc ## 2 | set(W64BIT "") 3 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libdivsufsort.pc.cmake" "${CMAKE_CURRENT_BINARY_DIR}/libdivsufsort.pc" @ONLY) 4 | install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libdivsufsort.pc" DESTINATION ${CMAKE_INSTALL_PKGCONFIGDIR}) 5 | if(BUILD_DIVSUFSORT64) 6 | set(W64BIT "64") 7 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libdivsufsort.pc.cmake" "${CMAKE_CURRENT_BINARY_DIR}/libdivsufsort64.pc" @ONLY) 8 | install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libdivsufsort64.pc" DESTINATION ${CMAKE_INSTALL_PKGCONFIGDIR}) 9 | endif(BUILD_DIVSUFSORT64) 10 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/external/libdivsufsort/pkgconfig/libdivsufsort.pc.cmake: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=@CMAKE_INSTALL_LIBDIR@ 4 | includedir=@CMAKE_INSTALL_INCLUDEDIR@ 5 | 6 | Name: @PROJECT_NAME@@W64BIT@ 7 | Description: @PROJECT_DESCRIPTION@ 8 | Version: @PROJECT_VERSION_FULL@ 9 | URL: @PROJECT_URL@ 10 | Libs: -L${libdir} -ldivsufsort@W64BIT@ 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/extras/README.md: -------------------------------------------------------------------------------- 1 | # Additional resources 2 | 3 | 4 | ## Cheatsheet 5 | 6 | A short reference for the use of the library can be generated by executing 7 | `make` in the [cheatsheet](./cheatsheet) directory. 8 | 9 | 10 | ## Debugging 11 | 12 | Sometimes even the best coder produces bugs. For this case we provide a 13 | useful resource for the [GNU Debugger][gdb]. 14 | Copy the content of `sdsl.gdb` into your .gdbinit file an you can display the 15 | elements of `sdsl::vector<>` (and `sdsl::bitvector`) with the command `pv` in 16 | gdb. 17 | 18 | ## Code style 19 | 20 | The install script will copy the [pre-commit](./pre-commit) file into the 21 | `.git/hooks` directory of your library clone. It will run [astyle][as] 22 | before code gets committed. Please make sure that you have it installed 23 | [astyle][as], if you plan to push your changes to the project. 24 | 25 | [gdb]: http://www.gnu.org/software/gdb/ "GDB: The GNU Project Debugger" 26 | [as]: http://astyle.sourceforge.net/ "Astyle" 27 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/extras/cheatsheet/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !Makefile 4 | !sdsl-cheatsheet.tex 5 | !hyperendnotes.sty 6 | !viz.pdf 7 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/extras/cheatsheet/Makefile: -------------------------------------------------------------------------------- 1 | 2 | sdsl-cheatsheet.pdf: sdsl-cheatsheet.tex 3 | pdflatex sdsl-cheatsheet.tex 4 | 5 | clean: 6 | rm -f sdsl-cheatsheet.pdf \ 7 | sdsl-cheatsheet.aux 8 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/extras/cheatsheet/viz.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/ThirdParty/sdsl-lite/extras/cheatsheet/viz.pdf -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/extras/resources/space-vis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/ThirdParty/sdsl-lite/extras/resources/space-vis.png -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/extras/sdsl.natvis: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ size={ m_size/m_width } width={ (int)m_width } }} 5 | 6 | m_size/m_width 7 | (int)m_width 8 | 9 | m_size/m_width 10 | (uint64_t*)m_data 11 | 12 | 13 | m_size/m_width 14 | (uint32_t*)m_data 15 | 16 | 17 | m_size/m_width 18 | (uint8_t*)m_data 19 | 20 | 21 | 22 | 23 | {{ size={ m_size/8 } } }} 24 | 25 | m_size/8 26 | 27 | m_size/8 28 | (uint8_t*)m_data 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/extras/sdsl_definitions.sty: -------------------------------------------------------------------------------- 1 | \newcommand{\Order}[1]{\mathcal{O}(#1)} % big O-Notation 2 | \newcommand{\order}[1]{\mathcal{o}(#1)} % small o-Notation 3 | 4 | \newcommand{\lcpaccess}[0]{\ensuremath{t_{LCP}}} 5 | \newcommand{\saaccess}[0]{\ensuremath{t_{SA}}} 6 | \newcommand{\isaaccess}[0]{\ensuremath{t_{SA^{-1}}}} 7 | \newcommand{\rrenclose}[0]{\ensuremath{t_{\mathit{rr-enclose}}}} 8 | 9 | \newcommand{\CSA}[0]{\ensuremath{\mathcal{CSA}}} 10 | \newcommand{\CST}[0]{\ensuremath{\mathcal{CST}}} 11 | 12 | \newcommand{\SUF}[0]{\ensuremath{\mathcal{SA}}} 13 | \newcommand{\ISA}[0]{\ensuremath{\mathcal{SA}^{-1}}} 14 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(sdsl) 2 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/include/sdsl/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !experimental/ 3 | !CMakeLists.txt 4 | !.gitignore 5 | !*.hpp 6 | !*.cmake 7 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/include/sdsl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(CheckIncludeFile) 2 | include(CheckIncludeFileCXX) 3 | include(CheckTypeSize) 4 | 5 | ## Check for header files ## 6 | check_include_file_CXX(cstdio HAVE_STDIO) 7 | 8 | ## copy hpp files to the binary tree ## 9 | 10 | file(GLOB hppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") # select all .hpp-files 11 | 12 | foreach(hppFile ${hppFiles}) # copy each file 13 | configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/${hppFile}" "${CMAKE_CURRENT_BINARY_DIR}/${hppFile}" COPYONLY ) 14 | install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${hppFile}" DESTINATION include/sdsl) 15 | # MESSAGE(${hppFile}) 16 | endforeach(hppFile) 17 | 18 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/include/sdsl/bit_vectors.hpp: -------------------------------------------------------------------------------- 1 | /*! \file bit_vectors.hpp 2 | \brief bit_vectors.hpp contains classes for uncompressed and compressed bit vector representations. 3 | \author Simon Gog 4 | */ 5 | #ifndef INCLUDED_SDSL_BITVECTORS 6 | #define INCLUDED_SDSL_BITVECTORS 7 | 8 | #include "int_vector.hpp" 9 | #include "bit_vector_il.hpp" 10 | #include "rrr_vector.hpp" 11 | #include "sd_vector.hpp" 12 | #include "hyb_vector.hpp" 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/include/sdsl/construct_config.hpp: -------------------------------------------------------------------------------- 1 | #ifndef INCLUDED_SDSL_CONSTRUCT_CONFIG 2 | #define INCLUDED_SDSL_CONSTRUCT_CONFIG 3 | 4 | #include "config.hpp" 5 | 6 | namespace sdsl 7 | { 8 | 9 | class construct_config 10 | { 11 | public: 12 | static byte_sa_algo_type byte_algo_sa; 13 | 14 | construct_config() = delete; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/include/sdsl/construct_isa.hpp: -------------------------------------------------------------------------------- 1 | /* sdsl - succinct data structures library 2 | Copyright (C) 2010 Simon Gog 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see http://www.gnu.org/licenses/ . 16 | */ 17 | /*! \file construct_isa.hpp 18 | \brief construct_isa.hpp contains a space and time efficient construction method for the inverse suffix array 19 | \author Simon Gog 20 | */ 21 | #ifndef INCLUDED_SDSL_CONSTRUCT_ISA 22 | #define INCLUDED_SDSL_CONSTRUCT_ISA 23 | 24 | #include "int_vector.hpp" 25 | #include "util.hpp" 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | namespace sdsl 32 | { 33 | 34 | void construct_isa(cache_config& config); 35 | 36 | }// end namespace 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/include/sdsl/fast_cache.hpp: -------------------------------------------------------------------------------- 1 | 2 | #ifndef INCLUDED_SDSL_FAST_CACHE 3 | #define INCLUDED_SDSL_FAST_CACHE 4 | 5 | #include "int_vector.hpp" 6 | 7 | namespace sdsl 8 | { 9 | 10 | #define CACHE_SIZE 0x3FFULL 11 | 12 | struct fast_cache { 13 | typedef int_vector<>::size_type size_type; 14 | size_type m_table[2*(CACHE_SIZE+1)]; 15 | // Constructor 16 | fast_cache() { 17 | for (size_type i=0; i < (CACHE_SIZE+1); ++i) { 18 | m_table[i<<1] = (size_type)-1; 19 | } 20 | } 21 | // Returns true if the request i is cached and 22 | // x is set to the answer of request i 23 | bool exists(size_type i, size_type& x) { 24 | if (m_table[(i&CACHE_SIZE)<<1 ] == i) { 25 | x = m_table[((i&CACHE_SIZE)<<1) + 1 ]; 26 | return true; 27 | } else 28 | return false; 29 | } 30 | // Writes the answer for request i to the cache 31 | void write(size_type i, size_type x) { 32 | m_table[(i&CACHE_SIZE)<<1 ] = i; 33 | m_table[((i&CACHE_SIZE)<<1) + 1 ] = x; 34 | } 35 | }; 36 | 37 | } // end namespace sdsl 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/include/sdsl/raster_img.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SDSL_INC_RASTER_IMG 2 | #define SDSL_INC_RASTER_IMG 3 | 4 | #include 5 | 6 | namespace sdsl 7 | { 8 | 9 | struct raster_img { 10 | typedef uint64_t size_type; 11 | 12 | uint64_t max_x; // max x value 13 | uint64_t max_y; // max y value 14 | uint64_t max_z; // max z value in the compacted range 15 | uint32_t offset; 16 | bit_vector value_map; 17 | int_vector<> data; 18 | 19 | //! Serializes the data structure into the given ostream 20 | uint64_t serialize(std::ostream& out, structure_tree_node* v=nullptr, std::string name="")const; 21 | 22 | //! Loads the data structure from the given istream. 23 | void load(std::istream& in); 24 | }; 25 | 26 | } 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/include/sdsl/uintx_t.hpp: -------------------------------------------------------------------------------- 1 | #ifndef INCLUDED_SDSL_UINTX_T 2 | #define INCLUDED_SDSL_UINTX_T 3 | 4 | #include 5 | 6 | using std::int8_t; 7 | using std::int16_t; 8 | using std::int32_t; 9 | using std::int64_t; 10 | 11 | using std::uint8_t; 12 | using std::uint16_t; 13 | using std::uint32_t; 14 | using std::uint64_t; 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/include/sdsl/vectors.hpp: -------------------------------------------------------------------------------- 1 | /** \defgroup int_vector int_vector */ 2 | #ifndef SDSL_INCLUDED_VECTORS 3 | #define SDSL_INCLUDED_VECTORS 4 | 5 | #include "int_vector.hpp" 6 | #include "enc_vector.hpp" 7 | #include "vlc_vector.hpp" 8 | #include "dac_vector.hpp" 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cls 3 | set CUR_DIR=%cd% 4 | echo CUR_DIR=%CUR_DIR% 5 | 6 | set SDSL_INSTALL_PREFIX=%USERPROFILE% 7 | if not "%1"=="" ( 8 | pushd . 9 | cd %~dp0 10 | set SDSL_INSTALL_PREFIX=%~f1 11 | popd 12 | ) 13 | echo Library will be installed in %SDSL_INSTALL_PREFIX% 14 | 15 | rem Change to the directory in which this script is located in 16 | cd %~dp0 17 | 18 | rem TODO git hook 19 | 20 | cd build 21 | if errorlevel 1 ( 22 | exit /b %errorlevel% 23 | ) 24 | 25 | 26 | rem TODO clean-up build directory 27 | 28 | cmake -DCMAKE_INSTALL_PREFIX="${SDSL_INSTALL_PREFIX}" -G"Visual Studio 14 2015" .. 29 | if errorlevel 1 ( 30 | echo ERROR: CMake build failed 31 | exit /b %errorlevel% 32 | ) 33 | 34 | "%VS140COMNTOOLS%..\IDE\devenv.com" /build release /project sdsl sdsl.sln 35 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/lib/.gitignore: -------------------------------------------------------------------------------- 1 | structure_tree.cpp 2 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(#"${CMAKE_CURRENT_SOURCE_DIR}/../include" 2 | "${CMAKE_CURRENT_BINARY_DIR}/../include" 3 | "${CMAKE_CURRENT_BINARY_DIR}/../external/libdivsufsort/include" 4 | ) 5 | 6 | 7 | file(GLOB libFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") # select all .cpp-files 8 | if(MSVC) 9 | file(GLOB headerFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/../include/sdsl/*.hpp") # select all .hpp-files 10 | endif() 11 | 12 | set( sdsl_SRCS ${libFiles} ${headerFiles}) 13 | 14 | add_library( sdsl ${sdsl_SRCS} ) 15 | 16 | install(TARGETS sdsl 17 | RUNTIME DESTINATION bin 18 | LIBRARY DESTINATION lib 19 | ARCHIVE DESTINATION lib) 20 | 21 | math(EXPR SOVERSION "${LIBRARY_VERSION_MAJOR}+1") 22 | 23 | set_target_properties(sdsl PROPERTIES 24 | VERSION "${LIBRARY_VERSION_FULL}" 25 | SOVERSION "${SOVERSION}" 26 | # DEFINE_SYMBOL SDSL_BUILD_DLL 27 | # RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../examples" 28 | ) 29 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/lib/config.cpp: -------------------------------------------------------------------------------- 1 | #include "sdsl/config.hpp" 2 | #include "sdsl/util.hpp" 3 | 4 | namespace sdsl 5 | { 6 | cache_config::cache_config(bool f_delete_files, std::string f_dir, std::string f_id, tMSS f_file_map) : delete_files(f_delete_files), dir(f_dir), id(f_id), file_map(f_file_map) 7 | { 8 | if ("" == id) { 9 | id = util::to_string(util::pid())+"_"+util::to_string(util::id()); 10 | } 11 | } 12 | 13 | template<> 14 | const char* key_text_trait<0>::KEY_TEXT = conf::KEY_TEXT_INT; 15 | template<> 16 | const char* key_text_trait<8>::KEY_TEXT = conf::KEY_TEXT; 17 | 18 | template<> 19 | const char* key_bwt_trait<0>::KEY_BWT = conf::KEY_BWT_INT; 20 | template<> 21 | const char* key_bwt_trait<8>::KEY_BWT = conf::KEY_BWT; 22 | 23 | }// end namespace sdsl 24 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/lib/construct_config.cpp: -------------------------------------------------------------------------------- 1 | #include "sdsl/construct_config.hpp" 2 | 3 | namespace sdsl 4 | { 5 | 6 | byte_sa_algo_type construct_config::byte_algo_sa = LIBDIVSUFSORT; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/lib/construct_isa.cpp: -------------------------------------------------------------------------------- 1 | /* sdsl - succinct data structures library 2 | Copyright (C) 2010 Simon Gog 3 | */ 4 | #include "sdsl/construct_isa.hpp" 5 | #include 6 | 7 | namespace sdsl 8 | { 9 | 10 | void construct_isa(cache_config& config) 11 | { 12 | typedef int_vector<>::size_type size_type; 13 | if (!cache_file_exists(conf::KEY_ISA, config)) { // if isa is not already on disk => calculate it 14 | int_vector_buffer<> sa_buf(cache_file_name(conf::KEY_SA, config)); 15 | if (!sa_buf.is_open()) { 16 | throw std::ios_base::failure("cst_construct: Cannot load SA from file system!"); 17 | } 18 | int_vector<> isa(sa_buf.size()); 19 | for (size_type i=0; i < isa.size(); ++i) { 20 | isa[ sa_buf[i] ] = i; 21 | } 22 | store_to_cache(isa, conf::KEY_ISA, config); 23 | } 24 | } 25 | 26 | }// end namespace 27 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/lib/construct_sa.cpp: -------------------------------------------------------------------------------- 1 | #include "sdsl/construct_sa.hpp" 2 | 3 | namespace sdsl 4 | { 5 | 6 | void construct_sa_se(cache_config& config) 7 | { 8 | int_vector<8> text; 9 | load_from_file(text, cache_file_name(conf::KEY_TEXT, config)); 10 | 11 | if (text.size() <= 2) { 12 | // If text is c$ or $ write suffix array [1, 0] or [0] 13 | int_vector_buffer<> sa(cache_file_name(conf::KEY_SA, config), std::ios::out, 8, 2); 14 | if (text.size() == 2) { 15 | sa.push_back(1); 16 | } 17 | sa.push_back(0); 18 | } else { 19 | _construct_sa_se>(text, cache_file_name(conf::KEY_SA, config), 256, 0); 20 | } 21 | register_cache_file(conf::KEY_SA, config); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/lib/lcp_support_tree.cpp: -------------------------------------------------------------------------------- 1 | #include "sdsl/lcp_support_tree.hpp" 2 | 3 | namespace sdsl 4 | { 5 | 6 | void construct_first_child_lcp(int_vector_buffer<>& lcp_buf, int_vector<>& fc_lcp) 7 | { 8 | typedef int_vector_size_type size_type; 9 | size_type n = lcp_buf.size(); 10 | if (n == 0) { // if n == 0 we are done 11 | fc_lcp = int_vector<>(0); 12 | } 13 | { 14 | int_vector<> tmp(n, 0, bits::hi(n)+1); 15 | fc_lcp.swap(tmp); 16 | } 17 | 18 | size_type fc_cnt=0; // first child counter 19 | sorted_multi_stack_support vec_stack(n); 20 | size_type y; 21 | for (size_type i=0, x; i < n; ++i) { 22 | x = lcp_buf[i]; 23 | while (!vec_stack.empty() and x < vec_stack.top()) { 24 | y = vec_stack.top(); 25 | if (vec_stack.pop()) { 26 | fc_lcp[fc_cnt++] = y; 27 | } 28 | } 29 | vec_stack.push(x); 30 | } 31 | 32 | while (!vec_stack.empty()) { 33 | y = vec_stack.top(); 34 | if (vec_stack.pop()) { 35 | fc_lcp[fc_cnt++] = y; 36 | } 37 | } 38 | if (fc_cnt < fc_lcp.size()) { 39 | fc_lcp.resize(fc_cnt); 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/lib/louds_tree.cpp: -------------------------------------------------------------------------------- 1 | #include "sdsl/louds_tree.hpp" 2 | 3 | namespace sdsl 4 | { 5 | std::ostream& operator<<(std::ostream& os, const louds_node& v) 6 | { 7 | os<<"("<> 64), (uint64_t)x}; 10 | for (int j=0; j < 2; ++j) { 11 | for (int i=0; i < 16; ++i) { 12 | os << std::hex << ((X[j]>>60)&0xFULL) << std::dec; 13 | X[j] <<= 4; 14 | } 15 | } 16 | return os; 17 | } 18 | 19 | } // end namespace 20 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/lib/uint256_t.cpp: -------------------------------------------------------------------------------- 1 | #include "sdsl/uint256_t.hpp" 2 | 3 | //! Namespace for the succinct data structure library 4 | namespace sdsl 5 | { 6 | std::ostream& operator<<(std::ostream& os, const uint256_t& x) 7 | { 8 | uint64_t X[4] = {(uint64_t)(x.m_high >> 64), (uint64_t)x.m_high, x.m_mid, x.m_lo}; 9 | for (int j=0; j < 4; ++j) { 10 | for (int i=0; i < 16; ++i) { 11 | os << std::hex << ((X[j]>>60)&0xFULL) << std::dec; 12 | X[j] <<= 4; 13 | } 14 | } 15 | return os; 16 | } 17 | } // end namespace 18 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/lib/wt_helper.cpp: -------------------------------------------------------------------------------- 1 | #include "sdsl/wt_helper.hpp" 2 | 3 | namespace sdsl 4 | { 5 | 6 | bool empty(const range_type& r) 7 | { 8 | return std::get<0>(r) == (std::get<1>(r) + 1); 9 | } 10 | 11 | int_vector<>::size_type size(const range_type& r) 12 | { 13 | return std::get<1>(r) - std::get<0>(r) + 1; 14 | } 15 | 16 | 17 | pc_node::pc_node(uint64_t freq, uint64_t sym, uint64_t parent, 18 | uint64_t child_left, uint64_t child_right): 19 | freq(freq), sym(sym), parent(parent) 20 | { 21 | child[0] = child_left; 22 | child[1] = child_right; 23 | } 24 | 25 | pc_node& pc_node::operator=(const pc_node& v) 26 | { 27 | freq = v.freq; 28 | sym = v.sym; 29 | parent = v.parent; 30 | child[0] = v.child[0]; 31 | child[1] = v.child[1]; 32 | return *this; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/sdsl-lite.pc.cmake: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: @PROJECT_NAME@ 7 | Description: @PROJECT_DESCRIPTION@ 8 | Version: @PROJECT_VERSION_FULL@ 9 | URL: @PROJECT_URL@ 10 | Libs: -L${libdir} -lsdsl -ldivsufsort -ldivsufsort64 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/.gitignore: -------------------------------------------------------------------------------- 1 | *.x 2 | *.x.dSYM 3 | *.gcno 4 | *.gcda 5 | *.swp 6 | *.swo 7 | compile_test.cpp 8 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/bit_vector_test.config: -------------------------------------------------------------------------------- 1 | # Inputs which should be used in BitVectorTest, 2 | # RankSupportTest, SelectSupportTest, and 3 | # SelectSupport0Test 4 | # Each line contains a path to a bit_vector. 5 | int-vec.0.1.0 6 | int-vec.1.1.0 7 | int-vec.1000000.1.0 8 | int-vec.1000000.1.1 9 | int-vec.7.1.1 10 | int-vec.8.1.0 11 | int-vec.9.1.1 12 | int-vec.10.1.0 13 | int-vec.11.1.1 14 | int-vec.12.1.0 15 | int-vec.13.1.1 16 | int-vec.14.1.0 17 | int-vec.15.1.1 18 | int-vec.8.1.r.17 19 | int-vec.16.1.r.42 20 | int-vec.32.1.r.111 21 | int-vec.64.1.r.222 22 | int-vec.128.1.r.73 23 | int-vec.256.1.r.4887 24 | int-vec.512.1.r.432 25 | int-vec.1024.1.r.898 26 | int-vec.2048.1.r.5432 27 | int-vec.4096.1.r.793 28 | int-vec.8192.1.r.1043 29 | int-vec.1000000.1.r.815 30 | bit-vec.CRAFTED-32 31 | bit-vec.CRAFTED-SPARSE-0 32 | bit-vec.CRAFTED-SPARSE-1 33 | bit-vec.CRAFTED-BLOCK-0 34 | bit-vec.CRAFTED-BLOCK-1 35 | bit-vec.CRAFTED-MAT-SELECT 36 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/compile_test.cpp.cmake: -------------------------------------------------------------------------------- 1 | #include "gtest/gtest.h" 2 | @SDSL_INCLUDE_ALL@ 3 | 4 | namespace 5 | { 6 | // The fixture for testing the compilation of all header files. 7 | class CompileTest : public ::testing::Test { }; 8 | 9 | //! Test constructors 10 | TEST_F(CompileTest, Compile) { } 11 | 12 | } // namespace 13 | 14 | int main(int argc, char** argv) 15 | { 16 | ::testing::InitGoogleTest(&argc, argv); 17 | return RUN_ALL_TESTS(); 18 | } 19 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/coverage/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !README.md 3 | !clean.sh 4 | !run.sh 5 | !.gitignore 6 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/coverage/README.md: -------------------------------------------------------------------------------- 1 | # Code coverage of tests 2 | 3 | This directory contains a script which generates statistics 4 | about the code coverage of the tests. 5 | 6 | A call of `./run.sh` will compile all tests with code coverage 7 | parameters and execute all tests to gather the information. 8 | 9 | 10 | ## Prerequisites 11 | 12 | * The GCC utility [gcov][GCOV] has to be installed and 13 | `g++` has to be used as compiler. 14 | * The HTML output is generated by the [lcov][LCOV] tool. 15 | 16 | 17 | [GCOV]: http://gcc.gnu.org/onlinedocs/gcc/Gcov.html "gcov" 18 | [LCOV]: http://ltp.sourceforge.net/coverage/lcov.php "lcov" 19 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/coverage/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # activate globbing 3 | shopt -s extglob 4 | # removes all but the listed files in the directory 5 | # and subdirectories 6 | rm -rf !(run.sh|clean.sh|.gitignore|README.md) 7 | 8 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/coverage/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CUR_DIR=`pwd` 4 | cd "${CUR_DIR}" 5 | OLD_DIR="$( cd "$( dirname "$0" )" && pwd )" # gets the directory where the script is located in 6 | cd "${OLD_DIR}" 7 | OLD_DIR=`pwd` 8 | 9 | lcov --directory .. --zerocounters 10 | 11 | cd .. 12 | make clean 13 | make CODE_COVER="-g -fprofile-arcs -ftest-coverage -lgcov" $1 14 | MAKERET=$? 15 | cd ${OLD_DIR} 16 | 17 | if [ ${MAKERET} != 0 ]; then 18 | echo "ERROR: tests failed." 19 | exit 1 20 | fi 21 | 22 | INC_STR=`grep 'INC_DIR = ' ../../Make.helper` 23 | INC_DIR=${INC_STR#INC_DIR = } 24 | 25 | lcov -d .. -d ${INC_DIR}/sdsl --no-recursion --no-external --capture --output-file sdsl-lite.info 26 | genhtml -o output --legend sdsl-lite.info 27 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/csa_byte_test.config: -------------------------------------------------------------------------------- 1 | empty.txt 2 | example01.txt 3 | 100a.txt 4 | faust.txt 5 | zarathustra.txt 6 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/csa_int_test.config: -------------------------------------------------------------------------------- 1 | # Each line contains [TEST_CASE_NAME];[NUM_BYTE] 2 | empty.txt;1 3 | example01.txt;1 4 | 100a.txt;1 5 | faust.txt;1 6 | zarathustra.txt;1 7 | keeper.int;8 8 | moby.int;8 9 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/cst_byte_test.config: -------------------------------------------------------------------------------- 1 | empty.txt 2 | example01.txt 3 | 100a.txt 4 | faust.txt 5 | #zarathustra.txt 6 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/cst_int_test.config: -------------------------------------------------------------------------------- 1 | # Texts which should be used in the CstIntTest. 2 | # Each line contains [TEST_CASE_FILE];[NUM_BYTE] 3 | empty.txt;1 4 | example01.txt;1 5 | 100a.txt;1 6 | faust.txt;1 7 | #zarathustra.txt;1 8 | keeper.int;8 9 | moby.int;8 10 | int-vec-sa.100000.18.r;0 11 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/download.cmake: -------------------------------------------------------------------------------- 1 | GET_FILENAME_COMPONENT(file_name ${download_url} NAME) 2 | SET(test_case_tar_gz ${test_case_dir}/${file_name}) 3 | MESSAGE("test_case_tar_gz=${test_case_tar_gz}") 4 | FILE(DOWNLOAD ${download_url} ${test_case_tar_gz} STATUS status SHOW_PROGRESS) 5 | LIST(GET status 0 status_code) 6 | IF(NOT ${status_code} EQUAL 0) 7 | MESSAGE(FATAL_ERROR "Downloading test file failed.\n ${status}\n") 8 | ENDIF(NOT ${status_code} EQUAL 0) 9 | EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar xzf ${test_case_tar_gz} 10 | WORKING_DIRECTORY ${test_case_dir}) 11 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/download.config: -------------------------------------------------------------------------------- 1 | # [TC_PATH];[TC_DOWNLOAD_URL] 2 | faust.txt;http://algo2.iti.kit.edu/gog/sdsl/faust.txt.tar.gz 3 | zarathustra.txt;http://algo2.iti.kit.edu/gog/sdsl/zarathustra.txt.tar.gz 4 | moby.int;http://algo2.iti.kit.edu/gog/sdsl/moby.int.tar.gz 5 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/k2_treap_test.config: -------------------------------------------------------------------------------- 1 | # Inputs which should be used 2 | # each row contains 3 times parameters for the int_vector generator 3 | 0.1.0.0;0.1.0.0;0.1.0.0 4 | 100.16.r.42;100.16.r.23;100.8.r.81 5 | 10000.16.r.42;10000.16.r.23;10000.8.r.81 6 | 100000.39.r.42;100000.47.r.23;100000.35.r.81 7 | 1000000.52.r.42;1000000.57.r.23;1000000.45.r.81 8 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/lcp_construct_test.config: -------------------------------------------------------------------------------- 1 | empty.txt 2 | example01.txt 3 | 100a.txt 4 | faust.txt 5 | zarathustra.txt 6 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/rank_support_test.config: -------------------------------------------------------------------------------- 1 | # Each line contains a bit_vector test 2 | int-vec.0.1.0 3 | int-vec.1.1.0 4 | int-vec.1000000.1.0 5 | int-vec.1000000.1.1 6 | int-vec.7.1.1 7 | int-vec.8.1.0 8 | int-vec.9.1.1 9 | int-vec.10.1.0 10 | int-vec.11.1.1 11 | int-vec.12.1.0 12 | int-vec.13.1.1 13 | int-vec.14.1.0 14 | int-vec.15.1.1 15 | int-vec.8.1.r.17 16 | int-vec.16.1.r.42 17 | int-vec.32.1.r.111 18 | int-vec.64.1.r.222 19 | int-vec.128.1.r.73 20 | int-vec.256.1.r.4887 21 | int-vec.512.1.r.432 22 | int-vec.1024.1.r.898 23 | int-vec.2048.1.r.5432 24 | int-vec.4096.1.r.793 25 | int-vec.8192.1.r.1043 26 | int-vec.1000000.1.r.815 27 | bit-vec.CRAFTED-32 28 | bit-vec.CRAFTED-SPARSE-0 29 | bit-vec.CRAFTED-SPARSE-1 30 | bit-vec.CRAFTED-BLOCK-0 31 | bit-vec.CRAFTED-BLOCK-1 32 | bit-vec.CRAFTED-MAT-SELECT 33 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/replace_int_vector_value.cpp: -------------------------------------------------------------------------------- 1 | #include "sdsl/int_vector.hpp" 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | using namespace sdsl; 7 | 8 | int main(int argc, char* argv[]) 9 | { 10 | if (argc < 4) { 11 | cout << "Usage: " << argv[0] << " FILE X Y" << endl; 12 | cout << " Loads an int_vector<>(SIZE, DEFAULT_VALUE, WIDTH)" << endl; 13 | cout << " and replaces all values X with Y and stores the " << endl; 14 | cout << " result in the same file." << endl; 15 | return 1; 16 | } 17 | uint64_t x = atoi(argv[2]); 18 | uint64_t y = atoi(argv[3]); 19 | int_vector_buffer<> v(argv[1]); 20 | if (v.good()) { 21 | for (size_t i=0; i file " << argv[1] << endl; 29 | return 1; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/rmq_test.config: -------------------------------------------------------------------------------- 1 | int-vec.0.1.0 2 | int-vec.1.64.42 3 | int-vec.1000000.64.i 4 | int-vec.1000000.32.i.42 5 | int-vec.1000000.64.i.17 6 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/sa_construct_test.config: -------------------------------------------------------------------------------- 1 | empty.txt 2 | one_byte.txt 3 | example01.txt 4 | 100a.txt 5 | faust.txt 6 | zarathustra.txt 7 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/search_bidirectional_test.config: -------------------------------------------------------------------------------- 1 | # Texts which should be used in the SerachBidirectionalTest. 2 | # Format: [TC_PATH] 3 | empty.txt 4 | example01.txt 5 | 100a.txt 6 | faust.txt 7 | zarathustra.txt 8 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/select_support_test.config: -------------------------------------------------------------------------------- 1 | # Each line contains a bit_vector file. 2 | int-vec.0.1.0 3 | int-vec.1.1.0 4 | int-vec.1000000.1.0 5 | int-vec.1000000.1.1 6 | int-vec.7.1.1 7 | int-vec.8.1.0 8 | int-vec.9.1.1 9 | int-vec.10.1.0 10 | int-vec.11.1.1 11 | int-vec.12.1.0 12 | int-vec.13.1.1 13 | int-vec.14.1.0 14 | int-vec.15.1.1 15 | int-vec.8.1.r.17 16 | int-vec.16.1.r.42 17 | int-vec.32.1.r.111 18 | int-vec.64.1.r.222 19 | int-vec.128.1.r.73 20 | int-vec.256.1.r.4887 21 | int-vec.512.1.r.432 22 | int-vec.1024.1.r.898 23 | int-vec.2048.1.r.5432 24 | int-vec.4096.1.r.793 25 | int-vec.8192.1.r.1043 26 | int-vec.1000000.1.r.815 27 | bit-vec.CRAFTED-32 28 | bit-vec.CRAFTED-SPARSE-0 29 | bit-vec.CRAFTED-SPARSE-1 30 | bit-vec.CRAFTED-BLOCK-0 31 | bit-vec.CRAFTED-BLOCK-1 32 | bit-vec.CRAFTED-MAT-SELECT 33 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/test_cases/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !100a.txt 3 | !README.md 4 | !abc_abc_abc.txt 5 | !abc_abc_abc2.txt 6 | !empty.txt 7 | !example01.txt 8 | !keeper.int 9 | !one_byte.txt 10 | !all_symbols.txt 11 | !.gitignore 12 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/test_cases/100a.txt: -------------------------------------------------------------------------------- 1 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/test_cases/README.md: -------------------------------------------------------------------------------- 1 | # Test inputs 2 | 3 | This directory contains some small inputs and will 4 | be populated by larger inputs when running the 5 | all tests. 6 | 7 | TODO: describe what the ending of the files mean. 8 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/test_cases/abc_abc_abc.txt: -------------------------------------------------------------------------------- 1 | abcabcabc 2 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/test_cases/abc_abc_abc2.txt: -------------------------------------------------------------------------------- 1 | abcabcabc 2 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/test_cases/all_symbols.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/ThirdParty/sdsl-lite/test/test_cases/all_symbols.txt -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/test_cases/empty.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/ThirdParty/sdsl-lite/test/test_cases/empty.txt -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/test_cases/example01.txt: -------------------------------------------------------------------------------- 1 | mississippi 2 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/test_cases/keeper.int: -------------------------------------------------------------------------------- 1 |          2 |  3 |  -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/test_cases/one_byte.txt: -------------------------------------------------------------------------------- 1 | a -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/tmp/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/wt_byte_test.config: -------------------------------------------------------------------------------- 1 | # Each line contains a test file 2 | empty.txt 3 | example01.txt 4 | 100a.txt 5 | all_symbols.txt 6 | faust.txt 7 | #zarathustra.txt 8 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/test/wt_int_test.config: -------------------------------------------------------------------------------- 1 | # Each line contains a text file. 2 | int-vec.0.1.0 3 | int-vec.1023.1.0 4 | int-vec.100023.1.0 5 | int-vec.64.2.0 6 | int-vec.100000.18.r 7 | #int-vec.10000000.18.r 8 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/.gitignore: -------------------------------------------------------------------------------- 1 | *.x 2 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/Makefile: -------------------------------------------------------------------------------- 1 | include ../Make.helper 2 | CXX_FLAGS=$(MY_CXX_FLAGS) $(MY_CXX_OPT_FLAGS) -I$(INC_DIR) -L$(LIB_DIR) 3 | CCLIB=-lsdsl -ldivsufsort -ldivsufsort64 4 | SOURCES=$(wildcard *.cpp) 5 | EXECS=$(SOURCES:.cpp=.x) 6 | 7 | all: $(EXECS) 8 | 9 | build-test: $(EXECS) 10 | 11 | %.x:%.cpp 12 | $(MY_CXX) $(CXX_FLAGS) -o $@ $< $(CCLIB) $(LDFLAGS) 13 | 14 | clean: 15 | rm -f $(EXECS) 16 | rm -rf *.dSYM 17 | 18 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/cst-traversal.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace sdsl; 6 | using namespace std; 7 | 8 | int main(int argc, char* argv[]) 9 | { 10 | if (argc < 3) { 11 | cout << "Usage: " << argv[0] << " file " << "int [max_depth]" << endl; 12 | return 1; 13 | } 14 | cst_sct3<> cst; 15 | construct(cst, argv[1], 1); 16 | uint64_t max_depth = stoull(argv[2]); 17 | 18 | // use the DFS iterator to traverse `cst` 19 | for (auto it=cst.begin(); it!=cst.end(); ++it) { 20 | if (it.visit() == 1) { // node visited the first time 21 | auto v = *it; // get the node by dereferencing the iterator 22 | if (cst.depth(v) <= max_depth) { // if depth node is <= max_depth 23 | // process node, e.g. output it in format d-[lb, rb] 24 | cout< 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | int_vector<> v = {3,2,1,0,2,1,3,4,1,1,1,3,2,3}; 10 | v[1] = 0; 11 | util::bit_compress(v); 12 | cout << v << endl; 13 | cout << size_in_bytes(v) << endl; 14 | } 15 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-02.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | int_vector<> v(10*(1<<20)); 10 | for (size_t i=0; i<10; ++i) 11 | for (size_t j=0; j < 1U<<20; ++j) 12 | v[i*(1<<20)+j] = j; 13 | cout << size_in_mega_bytes(v) << endl; 14 | util::bit_compress(v); 15 | cout << size_in_mega_bytes(v) << endl; 16 | enc_vector> ev(v); 17 | cout << size_in_mega_bytes(ev) << endl; 18 | } 19 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-03.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | using namespace std; 8 | using namespace sdsl; 9 | 10 | int main() 11 | { 12 | int_vector<> v(10*(1<<20), 0); 13 | v[0] = 1ULL<<63; 14 | //util::bit_compress(v); 15 | cout << size_in_mega_bytes(v) << endl; 16 | vlc_vector vv(v); 17 | cout << size_in_mega_bytes(vv) << endl; 18 | cout << "Percentage: " << size_in_mega_bytes(vv) / size_in_mega_bytes(v) * 100 << endl; 19 | } 20 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-04.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | bit_vector b = {1,1,0,1,0,0,1}; 10 | cout << b << endl; 11 | b = bit_vector(80*(1<<20), 0); 12 | for (size_t i=0; i < b.size(); i+=100) 13 | b[i] = 1; 14 | cout << size_in_mega_bytes(b) << endl; 15 | } 16 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-05.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | bit_vector b = bit_vector(80*(1<<20), 0); 10 | for (size_t i=0; i < b.size(); i+=100) 11 | b[i] = 1; 12 | cout << size_in_mega_bytes(b) << endl; 13 | rrr_vector<63> rrrb(b); 14 | cout << size_in_mega_bytes(rrrb) << endl; 15 | sd_vector<> sdb(b); 16 | cout << size_in_mega_bytes(sdb) << endl; 17 | } 18 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-06.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | bit_vector b = bit_vector(80*(1<<20), 0); 10 | for (size_t i=0; i < b.size(); i+=100) 11 | b[i] = 1; 12 | sd_vector<> sdb(b); 13 | write_structure(sdb, cout); 14 | } 15 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-07.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | bit_vector b = bit_vector(8000, 0); 10 | for (size_t i=0; i < b.size(); i+=100) 11 | b[i] = 1; 12 | rank_support_v<1> b_rank(&b); 13 | for (size_t i=0; i<=b.size(); i+= b.size()/4) 14 | cout << "(" << i << ", " << b_rank(i) << ") "; 15 | cout << endl; 16 | } 17 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-08.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | bit_vector b = bit_vector(8000, 0); 10 | for (size_t i=0; i < b.size(); i+=100) 11 | b[i] = 1; 12 | sd_vector<> sdb(b); 13 | sd_vector<>::rank_1_type sdb_rank(&sdb); 14 | for (size_t i=0; i<=sdb.size(); i+= sdb.size()/4) 15 | cout << "(" << i << ", " << sdb_rank(i) << ") "; 16 | cout << endl; 17 | rrr_vector<> rrrb(b); 18 | rrr_vector<>::rank_1_type rrrb_rank(&rrrb); 19 | for (size_t i=0; i<=rrrb.size(); i+= rrrb.size()/4) 20 | cout << "(" << i << ", " << rrrb_rank(i) << ") "; 21 | cout << endl; 22 | } 23 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-09.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | bit_vector b = {0,1,0,1}; 10 | rank_support_v<1> b_r1(&b); 11 | rank_support_v<0> b_r0(&b); 12 | rank_support_v<10,2> b_r10(&b); 13 | rank_support_v<01,2> b_r01(&b); 14 | for (size_t i=0; i<=b.size(); ++i) 15 | cout << i << ": "<< b_r1(i) << " " << b_r0(i) 16 | << " " << b_r10(i) << " " << b_r01(i) << endl; 17 | } 18 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-10.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | bit_vector b = {0,1,0,1,1,1,0,0,0,1,1}; 10 | size_t zeros = rank_support_v<0>(&b)(b.size()); 11 | bit_vector::select_0_type b_sel(&b); 12 | 13 | for (size_t i=1; i <= zeros; ++i) { 14 | cout << b_sel(i) << " "; 15 | } 16 | cout << endl; 17 | } 18 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-11.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | bit_vector b = {0,1,0,1,1,1,0,0,0,1,1}; 10 | size_t cnt10 = rank_support_v<10,2>(&b)(b.size()); 11 | select_support_mcl<10,2> b_sel10(&b); 12 | 13 | for (size_t i=1; i <= cnt10; ++i) 14 | cout << b_sel10(i) << " "; 15 | cout << endl; 16 | } 17 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-12.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | using namespace sdsl; 7 | 8 | int main() 9 | { 10 | sd_vector<> sd_b = bit_vector {1,0,1,1,1,0,1,1,0,0,1,0,0,1}; 11 | size_t ones = sd_vector<>::rank_1_type(&sd_b)(sd_b.size()); 12 | sd_vector<>::select_1_type sdb_sel(&sd_b); 13 | 14 | cout << sd_b << endl; 15 | 16 | for (size_t i=1; i <= ones; ++i) 17 | cout << sdb_sel(i) << " "; 18 | cout << endl; 19 | } 20 | 21 | 22 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-13.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | wt_blcd<> wt; 10 | construct(wt, "expl-13.cpp", 1); 11 | for (size_t i=0; i < wt.size() and wt[i]!='\n'; ++i) 12 | cout << wt[i]; 13 | cout << endl; 14 | cout << "number of lines : " << wt.rank(wt.size(), '\n') << endl; 15 | cout << "first '=' in line: " << wt.rank(wt.select(1, '='),'\n')+1 << endl; 16 | } 17 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-14.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | wt_hutu> wt; 10 | construct_im(wt, "こんにちは世界", 1); 11 | for (size_t i=0; i < wt.size(); ++i) 12 | cout << wt[i]; 13 | cout << endl; 14 | auto t1 = wt.lex_count(0, wt.size(), 0x80); 15 | auto t2 = wt.lex_count(0, wt.size(), 0xbf); 16 | cout << "# of bytes : " << wt.size() << endl; 17 | cout << "# of UTF-8 symbols: " << get<1>(t1) + get<2>(t2) << endl; 18 | } 19 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-15.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | using namespace sdsl; 7 | 8 | template 9 | ostream& operator<<(ostream& os, const std::pair& p) 10 | { 11 | return os << "(" << p.first << "," << p.second << ")"; 12 | } 13 | 14 | int main() 15 | { 16 | wt_int> wt; 17 | construct_im(wt, "6 1000 1 4 7 3 18 6 3", 'd'); 18 | auto res = wt.range_search_2d(1, 5, 4, 18); 19 | for (auto point : res.second) 20 | cout << point << " "; 21 | cout << endl; 22 | } 23 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-16.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | wt_huff_int> wt; 10 | construct_im(wt, int_vector<>({1981, 1974, 1990, 1974, 2014, 1974})); 11 | cout << "wt.sigma : " << wt.sigma << endl; 12 | cout << wt << endl; 13 | size_t idx = 5; 14 | auto r_c = wt.inverse_select(idx); 15 | cout << get<0>(r_c)+1 << " occurrence(s) of " 16 | << get<1>(r_c) << " in [0.." << idx << "]" << endl; 17 | } 18 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-17.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | csa_bitcompressed<> csa; 10 | construct_im(csa, "abracadabra", 1); 11 | cout << "csa.size(): " << csa.size() << endl; 12 | cout << "csa.sigma : " << csa.sigma << endl; 13 | cout << csa << endl; 14 | cout << extract(csa, 0, csa.size()-1) << endl; 15 | } 16 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-18.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | using namespace sdsl; 7 | 8 | int main() 9 | { 10 | csa_wt>,4,8> csa; // 接尾辞配列 11 | construct(csa, "expl-18.cpp", 1); 12 | cout << "count(\"配列\") : " << count(csa, "配列") << endl; 13 | auto occs = locate(csa, "\n"); 14 | sort(occs.begin(), occs.end()); 15 | auto max_line_length = occs[0]; 16 | for (size_t i=1; i < occs.size(); ++i) 17 | max_line_length = std::max(max_line_length, occs[i]-occs[i-1]+1); 18 | cout << "max line length : " << max_line_length << endl; 19 | } 20 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-19.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | using namespace sdsl; 7 | 8 | int main() 9 | { 10 | csa_wt>> csa; 11 | construct_im(csa, "1 8 15 23 1 8 23 11 8", 'd'); 12 | cout << " i SA ISA PSI LF BWT T[SA[i]..SA[i]-1]" << endl; 13 | csXprintf(cout, "%2I %2S %3s %3P %2p %3B %:3T", csa); 14 | } 15 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-20.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace sdsl; 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | memory_monitor::start(); 10 | csa_wt<> csa; 11 | construct(csa, "english.200MB", 1); 12 | memory_monitor::stop(); 13 | memory_monitor::write_memory_log(cout); 14 | } 15 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-21.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace sdsl; 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | cst_sct3<> cst; 10 | construct_im(cst, "umulmundumulmum", 1); 11 | cout << "inner nodes : " << cst.nodes() - cst.csa.size() << endl; 12 | auto v = cst.select_child(cst.child(cst.root(), 'u'),1); 13 | auto d = cst.depth(v); 14 | cout << "v : " << d << "-[" << cst.lb(v) << "," << cst.rb(v) << "]" << endl; 15 | cout << "extract(cst, v) : " << extract(cst, v) << endl; 16 | } 17 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-22.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace sdsl; 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | cst_sct3>>> cst; 10 | int_vector<> data(100000, 0, 10); 11 | for (size_t i=0; i < data.size(); ++i) 12 | data[i] = 1 + rand()%1023; 13 | construct_im(cst, data); 14 | cout << "cst.csa.sigma: " << cst.csa.sigma << endl; 15 | for (size_t k=0; k<3; ++k) 16 | cout << "H" << k << "(data) : " << get<0>(Hk(cst, k)) << endl; 17 | } 18 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-23.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace sdsl; 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | cst_sct3>>, lcp_support_sada<>> cst1; 10 | construct(cst1, "english.200MB", 1); 11 | cout << "cst1.lcp in MiB : " << size_in_mega_bytes(cst1.lcp) << endl; 12 | util::clear(cst1); 13 | cst_sct3>>, lcp_dac<>> cst2; 14 | construct(cst2, "english.200MB", 1); 15 | cout << "cst2.lcp in MiB : " << size_in_mega_bytes(cst2.lcp) << endl; 16 | } 17 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-24.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 10 | // ( ( ( ) ( ) ) ( ) ( ( ( ) ( ) ) ( ) ) ) 11 | bit_vector b = {1,1,1,0,1,0,0,1,0,1,1,1,0,1,0,0,1,0,0,0}; 12 | bp_support_sada<> bps(&b); // <- pointer to b 13 | cout << bps.find_close(0) << ", " 14 | << bps.find_open(3) << ", " 15 | << bps.enclose(4) << ", " 16 | << bps.double_enclose(13, 16) << endl; 17 | } 18 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-25.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | using namespace sdsl; 7 | 8 | int main() 9 | { 10 | // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 11 | // ( ( ( ) ( ) ) ( ) ( ( ( ) ( ) ) ( ) ) ) 12 | bit_vector b = {1,1,1,0,1,0,0,1,0,1,1,1,0,1,0,0,1,0,0,0}; 13 | bp_support_sada<> bps(&b); // <- pointer to b 14 | for (size_t i=0; i < b.size(); ++i) 15 | cout << bps.excess(i)<< " "; 16 | cout << endl; 17 | cout << bps.rank(0) << ", " // inclusive rank for BPS!!! 18 | << bps.select(4) << endl; 19 | } 20 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/expl-26.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace sdsl; 6 | 7 | int main() 8 | { 9 | // 0 1 2 3 4 5 6 7 8 9 0 10 | int_vector<> v = {5,3,8,9,1,2,5,3,9,0,7}; 11 | rmq_succinct_sct<> rmq(&v); // <- pointer to b 12 | util::clear(v); 13 | cout << "v.size() = " << v.size() << endl; 14 | cout << rmq(0, 10) << ", " << rmq(2, 7) << endl; 15 | } 16 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/int-vector-buffer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace sdsl; 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | std::string tmp_file = "tmp_file.sdsl"; 10 | { 11 | // generate int_vector and store to a file 12 | int_vector<> v = {1,3,5,7,2,3,4,9,8,7,10,1}; 13 | store_to_file(v, tmp_file); 14 | } 15 | { 16 | // use int_vector_buffer to open the file 17 | int_vector_buffer<> ivb(tmp_file); 18 | // output elements and assign 42 to each of them 19 | for (auto x : ivb) { 20 | cout << x << endl; 21 | x = 42; 22 | } 23 | // int_vector_buffer is destroy at the end of the 24 | // scope and all value are written to disk 25 | } 26 | { 27 | // read vector from file and output it 28 | int_vector<> v; 29 | load_from_file(v, tmp_file); 30 | cout << v << endl; 31 | } 32 | // delete temporary file 33 | sdsl::remove(tmp_file); 34 | } 35 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/rmq-example.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace sdsl; 5 | using namespace std; 6 | 7 | 8 | int main() 9 | { 10 | rmq_succinct_sct<> rmq; 11 | { 12 | // initilaize int_vector object A 13 | int_vector<> A = {6,7,3,2,4,2,1,5,8,2}; 14 | // output a 15 | cout << "A = " << A << endl; 16 | 17 | // generate range-minimum structure by passing 18 | // pointer to ordered array 19 | rmq = rmq_succinct_sct<>(&A); 20 | 21 | // calculate index of minimal element in a[0..a.size()-1] 22 | auto min_idx = rmq(0, A.size()-1); 23 | 24 | cout << "A[" << min_idx << "]=" << A[min_idx]; 25 | cout << " is the samllest element in A[0.." << A.size()-1 << "]" << endl; 26 | 27 | // calculate index of minimal element in a[2..5] 28 | min_idx = rmq(2,5); 29 | 30 | cout << "A[" << min_idx << "]=" << A[min_idx]; 31 | cout << " is the smallest element in A[2..5]" << endl; 32 | } 33 | // no A does not exist any more, queries can still be answered 34 | auto min_idx = rmq(1,5); 35 | cout << "A[" << min_idx << "] is the smallest in A[1..5]" << endl; 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/tutorial/use-a-wavelet-tree.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace sdsl; 5 | using namespace std; 6 | 7 | int main(int argc, char* argv[]) 8 | { 9 | if (argc < 2) { 10 | cout << "Usage: " << argv[0] << " file" << endl; 11 | return 1; 12 | } 13 | wt_huff> wt; 14 | construct(wt, argv[1], 1); 15 | 16 | cout << "wt.size()="<< wt.size() << endl; 17 | cout << "wt.sigma ="<< wt.sigma << endl; 18 | if (wt.size() > 0) { 19 | // access an element 20 | cout << "wt[0]=" << wt[0] << endl; 21 | // rank an element (exclude) 22 | uint64_t r = wt.rank(wt.size(), wt[0]); 23 | cout << "wt.rank(wt.size(), wt[0])=" << r << endl; 24 | // select element () 25 | cout << "wt.select(r, wt[0]) = " << wt.select(r, wt[0]) << endl; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ThirdParty/sdsl-lite/uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This script removes all installed sdsl files 3 | # on a LINUX or Mac OS X system 4 | 5 | CUR_DIR=`pwd` 6 | SDSL_INSTALL_PREFIX=${HOME} 7 | if [ $# -ge 1 ]; then 8 | SDSL_INSTALL_PREFIX=${1} 9 | fi 10 | 11 | echo "Library files will be removed from" 12 | echo "'${SDSL_INSTALL_PREFIX}/lib' and" 13 | echo "'${SDSL_INSTALL_PREFIX}/include'" 14 | 15 | 16 | cd "${CUR_DIR}" 17 | OLD_DIR="$( cd "$( dirname "$0" )" && pwd )" # gets the directory where the script is located in 18 | cd "${OLD_DIR}" 19 | OLD_DIR=`pwd` 20 | 21 | cd build # change into the build directory 22 | if [ $? != 0 ]; then 23 | exit 1 24 | fi 25 | 26 | if [ -f Makefile ]; then 27 | make uninstall-sdsl 28 | fi 29 | 30 | if [ $? != 0 ]; then 31 | exit 1 32 | fi 33 | 34 | ./clean.sh # clean-up build directory 35 | if [ $? != 0 ]; then 36 | exit 1 37 | fi 38 | 39 | echo "Installed sdsl files were removed." 40 | -------------------------------------------------------------------------------- /apps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB SRCS *.cpp) 2 | 3 | ADD_EXECUTABLE(kProcessorApp ${SRCS}) 4 | 5 | TARGET_LINK_LIBRARIES(kProcessorApp kProcessor MQF) 6 | -------------------------------------------------------------------------------- /apps/dumpMain.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "CLI11.hpp" 4 | #include 5 | #include 6 | #include 7 | #include "algorithms.hpp" 8 | #include "Utils/kmer.h" 9 | #include "Utils/utils.hpp" 10 | #include 11 | 12 | using namespace std; 13 | 14 | 15 | int dump_main(int argc, char *argv[]){ 16 | CLI::App app; 17 | string input_file=""; 18 | int k; 19 | string outputKmers=""; 20 | 21 | app.add_option("-i,--input", input_file, 22 | "MQF file")->required()->check(CLI::ExistingFile); 23 | app.add_option("-k,--kmer-length",k,"kmer length")->required(); 24 | app.add_option("-o,--output-kmers", outputKmers, 25 | "Output in the format of Kmer\tCount. Available only in Exact Counting")->group("I/O"); 26 | 27 | CLI11_PARSE(app, argc, argv); 28 | 29 | QF qf; 30 | qf_read(&qf,input_file.c_str()); 31 | 32 | kProcessor::dumpMQF(&qf,k,outputKmers); 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /apps/playground.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "CLI11.hpp" 4 | #include 5 | #include 6 | #include 7 | #include "algorithms.hpp" 8 | #include "Utils/kmer.h" 9 | #include "Utils/utils.hpp" 10 | #include 11 | 12 | using namespace std; 13 | 14 | 15 | int playground_main(int argc, char *argv[]){ 16 | CLI::App app; 17 | string input_file=""; 18 | 19 | app.add_option("-i,--input", input_file, 20 | "MQF file")->required()->check(CLI::ExistingFile); 21 | 22 | 23 | CLI11_PARSE(app, argc, argv); 24 | 25 | QF qf; 26 | qf_read(&qf,input_file.c_str()); 27 | double res=(double)qf.metadata->noccupied_slots/(double)qf.metadata->xnslots; 28 | cout< 3.5' 16 | s.add_runtime_dependency 'jekyll-seo-tag', '~> 2.0' 17 | s.add_development_dependency 'html-proofer', '~> 3.0' 18 | s.add_development_dependency 'rubocop', '~> 0.50' 19 | s.add_development_dependency 'w3c_validators', '~> 1.3' 20 | end 21 | -------------------------------------------------------------------------------- /docs/main/.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Require maintainer's :+1: for changes to the .github/ repo-config files 2 | # mainly due to https://github.com/probot/settings privilege escalation 3 | .github/* @pages-themes/maintainers 4 | -------------------------------------------------------------------------------- /docs/main/.github/no-response.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-no-response - https://github.com/probot/no-response 2 | 3 | # Number of days of inactivity before an Issue is closed for lack of response 4 | daysUntilClose: 14 5 | # Label requiring a response 6 | responseRequiredLabel: more-information-needed 7 | # Comment to post when closing an Issue for lack of response. Set to `false` to disable 8 | closeComment: > 9 | This issue has been automatically closed because there has been no response 10 | to our request for more information from the original author. With only the 11 | information that is currently in the issue, we don't have enough information 12 | to take action. Please reach out if you have or find the answers we need so 13 | that we can investigate further. 14 | -------------------------------------------------------------------------------- /docs/main/.github/settings.yml: -------------------------------------------------------------------------------- 1 | # Repository settings set via https://github.com/probot/settings 2 | 3 | repository: 4 | has_issues: true 5 | has_wiki: false 6 | has_projects: false 7 | has_downloads: false 8 | 9 | labels: 10 | - name: help wanted 11 | oldname: help-wanted 12 | color: 0e8a16 13 | - name: more-information-needed 14 | color: d93f0b 15 | - name: bug 16 | color: b60205 17 | - name: feature 18 | color: 1d76db 19 | - name: good first issue 20 | color: "5319e7" 21 | 22 | # Not currently implemented by probot/settings, but manually implemented in script/deploy 23 | branch_protection: 24 | restrictions: null 25 | enforce_admins: false 26 | required_status_checks: 27 | strict: true 28 | contexts: 29 | - "continuous-integration/travis-ci" 30 | required_pull_request_reviews: 31 | require_code_owner_reviews: true 32 | -------------------------------------------------------------------------------- /docs/main/.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-stale - https://github.com/probot/stale 2 | 3 | # Number of days of inactivity before an Issue or Pull Request becomes stale 4 | daysUntilStale: 60 5 | 6 | # Number of days of inactivity before a stale Issue or Pull Request is closed 7 | daysUntilClose: 7 8 | 9 | # Issues or Pull Requests with these labels will never be considered stale 10 | exemptLabels: 11 | - pinned 12 | - security 13 | 14 | # Label to use when marking as stale 15 | staleLabel: wontfix 16 | 17 | # Comment to post when marking as stale. Set to `false` to disable 18 | markComment: > 19 | This issue has been automatically marked as stale because it has not had 20 | recent activity. It will be closed if no further activity occurs. Thank you 21 | for your contributions. 22 | 23 | # Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable 24 | closeComment: false 25 | 26 | # Limit to only `issues` or `pulls` 27 | # only: issues 28 | -------------------------------------------------------------------------------- /docs/main/.gitignore: -------------------------------------------------------------------------------- 1 | _site 2 | .sass-cache 3 | Gemfile.lock 4 | *.gem 5 | -------------------------------------------------------------------------------- /docs/main/.rubocop.yml: -------------------------------------------------------------------------------- 1 | AllCops: 2 | Exclude: 3 | - _site/**/* 4 | 5 | Metrics/LineLength: 6 | Enabled: false 7 | -------------------------------------------------------------------------------- /docs/main/.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | cache: bundler 3 | sudo: false 4 | rvm: 2.5 5 | 6 | install: script/bootstrap 7 | script: script/cibuild 8 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/python/README.md: -------------------------------------------------------------------------------- 1 | # kProcessor 2 | ![Foo](https://img.shields.io/badge/Jupyter-notebook-green) 3 | ## Installation 4 | 5 | ### Requirements 6 | 7 | `sudo apt-get install g++ swig cmake python3-dev zlib1g-dev libghc-bzlib-dev python3-distutils` 8 | 9 | ## Install from PyPi 10 | 11 | `pip install kProcessor` 12 | 13 | ## Install Manually 14 | 15 | ### Clone 16 | 17 | ```bash 18 | git clone --recursive --branch devel https://github.com/dib-lab/kProcessor.git kProcessor 19 | cd kProcessor 20 | ``` 21 | 22 | ### Build kProcessorLib 23 | 24 | ```bash 25 | mkdir build 26 | cd build/ 27 | cmake .. 28 | make 29 | cd .. 30 | ``` 31 | 32 | ### Install kProcessor Python Package 33 | 34 | ```bash 35 | python3 setup.py install 36 | ``` 37 | 38 | ### Optional (Build wheel package) 39 | 40 | ```bash 41 | python3 setup.py bdist_wheel 42 | ``` 43 | 44 | --- 45 | 46 | ## Documentation 47 | 48 | - [kDataFrame](./kDataFrame.markdown) 49 | - [colored_kDataFrame](./coloredKDataFrame.markdown) 50 | - [kDataFrame Iterator](./kDataFrameIterator.markdown) 51 | - [kmerDecoder](./kmerDecoder.markdown) 52 | - [kmer counting](./kmerCounting.markdown) 53 | - [Indexing](./indexing.markdown) 54 | - [set functions](./setFunctions.markdown) 55 | -------------------------------------------------------------------------------- /docs/python/kmerCounting.markdown: -------------------------------------------------------------------------------- 1 | # kmer counting 2 | 3 | ## kmer counting from sequence string 4 | 5 | ```python 6 | 7 | kp.parseSequencesFromString(kmerDecoder, sequence_string, kDataFrame) 8 | 9 | ``` 10 | 11 | ### Example 12 | 13 | ```python 14 | 15 | # 1- Instantiate kmerDecoder object 16 | KD = kp.initialize_kmerDecoder("kmers", {"k_size":21}) 17 | 18 | # 2 - Instantiate kDataFrame 19 | KF = kp.kDataFrameMQF(21) 20 | 21 | # 3- Parse the sequene and insert the kmers in the kDataFrame 22 | kp.parseSequencesFromString(KD, seq, KF) 23 | 24 | 25 | ``` 26 | 27 | ## kmer counting from FASTA/Q file 28 | 29 | ```python 30 | 31 | kp.parseSequences(kmerDecoder, kDataFrame) 32 | 33 | ``` 34 | 35 | ### Example 36 | 37 | ```python 38 | 39 | # 1- Instantiate kmerDecoder object 40 | KD = kp.initialize_kmerDecoder("samples.fa", 1000, "kmers", {"k_size":21}) 41 | 42 | # 2 - Instantiate kDataFrame 43 | KF = kp.kDataFrameMQF(21) 44 | 45 | # 3- Parse the sequenes and insert the kmers in the kDataFrame 46 | kp.parseSequencesFromString(KD, KF) 47 | 48 | ``` 49 | -------------------------------------------------------------------------------- /docs/python/kmerDecoder.markdown: -------------------------------------------------------------------------------- 1 | # kmerDecoder 2 | 3 | kmerDecoder is important to tell the kProcessor how to parse sequences. 4 | 5 | It can be initialized to parse sequences files "FASTA/Q" or sequence strings. 6 | 7 | ## Modes 8 | 9 | There are three modes for decoding the sequences substrings {kmers, skipmers, minimizers} 10 | 11 | ## Parameters 12 | 13 | Mode parameters is a dictionary contains the parameters to initialize the kmerDecoder instance. 14 | 15 | 1. "kmers" mode parameters : `{"k_size" : k }` , where k is an integer. 16 | 2. "skipmers" mode parameters : `{"k_size" : k, "m" : m, "n" : n }` , where k,m,n are integers. 17 | 3. "minimizers" mode parameters : `{"k_size" : k, "w" : w }` , where k,w are integers. 18 | 19 | [read more about skipmers](https://www.biorxiv.org/content/biorxiv/early/2017/09/19/179960.full.pdf) 20 | 21 | ## Initialization 22 | 23 | ### Initialize to parse kmers 24 | 25 | ```python 26 | 27 | # FASTA/Q File to be parsed 28 | filename = "sample.fa" 29 | 30 | kmer_size = 21 31 | 32 | # The chunk size is to determine how many sequences to read and process at once 33 | chunk_size = 1000 34 | 35 | mode = "kmers" 36 | params = {"k_size": kmer_size} 37 | 38 | KD = kp.initialize_kmerDecoder(filename, chunk_size, mode, params) 39 | 40 | ``` 41 | 42 | ### Initialize to parse single sequence string 43 | 44 | ```python 45 | 46 | kmer_size = 21 47 | mode = "kmers" 48 | params = {"k_size": kmer_size} 49 | KD = kp.initialize_kmerDecoder(mode, params) 50 | 51 | ``` 52 | -------------------------------------------------------------------------------- /docs/python/setFunctions.markdown: -------------------------------------------------------------------------------- 1 | # kDataFrame Set Functions 2 | 3 | Set functions are functions that performs Union, Intersection and Difference between kDataFrames. 4 | 5 | > **Supports only kDataFrameMQF** 6 | 7 | ## Parameters 8 | 9 | All set functions takes list of kDataFrames as input and returns a new kDataFrame after performing the set function 10 | 11 | 12 | ## Union 13 | 14 | ```python 15 | 16 | union_kf = kp.kFrameUnion([kDataFrame1, kDataFrame2]) 17 | 18 | ``` 19 | ## Intersect 20 | 21 | ```python 22 | 23 | intersect_kf = kp.kFrameIntersect([kDataFrame1, kDataFrame2]) 24 | 25 | ``` 26 | ## Difference 27 | 28 | ```python 29 | 30 | diff_kf = kp.kFrameDiff([kDataFrame1, kDataFrame2]) 31 | 32 | ``` 33 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | nbsphinx 2 | sphinx_rtd_theme 3 | -------------------------------------------------------------------------------- /docs/script/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | gem install bundler 6 | bundle install 7 | -------------------------------------------------------------------------------- /docs/script/cibuild: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | bundle exec jekyll build 6 | bundle exec htmlproofer ./_site --check-html --check-sri --disable-external 7 | bundle exec rubocop -D 8 | bundle exec script/validate-html 9 | gem build jekyll-theme-cayman.gemspec 10 | -------------------------------------------------------------------------------- /docs/script/release: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Tag and push a release. 3 | 4 | set -e 5 | 6 | # Make sure we're in the project root. 7 | 8 | cd $(dirname "$0")/.. 9 | 10 | # Make sure the darn thing works 11 | 12 | bundle update 13 | 14 | # Build a new gem archive. 15 | 16 | rm -rf jekyll-theme-cayman-*.gem 17 | gem build -q jekyll-theme-cayman.gemspec 18 | 19 | # Make sure we're on the master branch. 20 | 21 | (git branch | grep -q 'master') || { 22 | echo "Only release from the master branch." 23 | exit 1 24 | } 25 | 26 | # Figure out what version we're releasing. 27 | 28 | tag=v`ls jekyll-theme-cayman-*.gem | sed 's/^jekyll-theme-cayman-\(.*\)\.gem$/\1/'` 29 | 30 | # Make sure we haven't released this version before. 31 | 32 | git fetch -t origin 33 | 34 | (git tag -l | grep -q "$tag") && { 35 | echo "Whoops, there's already a '${tag}' tag." 36 | exit 1 37 | } 38 | 39 | # Tag it and bag it. 40 | 41 | gem push jekyll-theme-cayman-*.gem && git tag "$tag" && 42 | git push origin master && git push origin "$tag" 43 | -------------------------------------------------------------------------------- /docs/script/server: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | bundle exec jekyll serve 4 | -------------------------------------------------------------------------------- /docs/script/validate-html: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'w3c_validators' 4 | 5 | def validator(file) 6 | extension = File.extname(file) 7 | if extension == '.html' 8 | W3CValidators::NuValidator.new 9 | elsif extension == '.css' 10 | W3CValidators::CSSValidator.new 11 | end 12 | end 13 | 14 | def validate(file) 15 | puts "Checking #{file}..." 16 | 17 | path = File.expand_path "../_site/#{file}", __dir__ 18 | results = validator(file).validate_file(path) 19 | 20 | return puts 'Valid!' if results.errors.empty? 21 | 22 | results.errors.each { |err| puts err.to_s } 23 | exit 1 24 | end 25 | 26 | validate 'index.html' 27 | validate File.join 'assets', 'css', 'style.css' 28 | -------------------------------------------------------------------------------- /docs/source/CITATION.md: -------------------------------------------------------------------------------- 1 | 2 | # Citations 3 | -------------------------------------------------------------------------------- /docs/source/LICENCE.md: -------------------------------------------------------------------------------- 1 | # LICENCE -------------------------------------------------------------------------------- /docs/source/_static/images/kDataFrame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/docs/source/_static/images/kDataFrame.png -------------------------------------------------------------------------------- /docs/source/cpp_api.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | C++ API 3 | ======= 4 | -------------------------------------------------------------------------------- /docs/source/get_started.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | ## Installation 4 | 5 | ### Install from Pypi 6 | 7 | > You will need to have the [pip](https://pypi.org/project/pip/) python package manager installed. 8 | 9 | `pip install kProcessor` 10 | 11 | ### Install Manually 12 | 13 | #### Requirements 14 | 15 | `sudo apt-get install g++ swig cmake python3-dev zlib1g-dev libghc-bzlib-dev python3-distutils` 16 | 17 | #### Clone 18 | 19 | ```bash 20 | git clone --recursive --branch devel https://github.com/dib-lab/kProcessor.git kProcessor 21 | cd kProcessor 22 | ``` 23 | 24 | #### Build kProcessorLib 25 | 26 | ```bash 27 | mkdir build 28 | cd build/ 29 | cmake .. 30 | make 31 | cd .. 32 | ``` 33 | 34 | #### Install kProcessor Python Package 35 | 36 | ```bash 37 | python3 setup.py install 38 | ``` 39 | 40 | ## Quick Start 41 | -------------------------------------------------------------------------------- /docs/source/index.rst: -------------------------------------------------------------------------------- 1 | Welcome to kProcessor's documentation! 2 | ====================================== 3 | 4 | 5 | 6 | .. include:: ../../README.rst 7 | 8 | 9 | 10 | .. toctree:: 11 | :maxdepth: 1 12 | :caption: Contents 13 | 14 | get_started 15 | recipes 16 | py_api 17 | cpp_api 18 | FAQ 19 | CITATION 20 | LICENCE 21 | 22 | 23 | Indices and tables 24 | ================== 25 | 26 | * :ref:`genindex` 27 | * :ref:`modindex` 28 | * :ref:`search` 29 | -------------------------------------------------------------------------------- /docs/source/recipes.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | Recipes 3 | ======= 4 | 5 | .. toctree:: 6 | :maxdepth: 2 7 | :numbered: 8 | :caption: Recipes 9 | 10 | recipes/recipe_1 11 | recipes/recipe_2 12 | recipes/recipe_3 13 | recipes/recipe_4 14 | recipes/recipe_5 15 | recipes/recipe_6 16 | -------------------------------------------------------------------------------- /docs/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/docs/thumbnail.png -------------------------------------------------------------------------------- /include/kProcessor/Utils/utils.hpp: -------------------------------------------------------------------------------- 1 | #ifndef UTILS_HPP 2 | #define UTILS_HPP 3 | #include 4 | #include 5 | #include 6 | 7 | 8 | namespace kProcessor::utils{ 9 | bool has_suffix(const std::string& s, const std::string& suffix); 10 | // Taken from 11 | // https://stackoverflow.com/questions/19189014/how-do-i-find-files-with-a-specific-extension-in-a-directory-that-is-provided-by 12 | std::vector GetFilesExt(const char *dir, const char *ext); 13 | std::string last_part(std::string str, char c); 14 | std::string first_part(std::string str, char c); 15 | bool FileExists(std::string); 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /include/kProcessor/batchQuery.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "colored_kDataFrame.hpp" 3 | 4 | using namespace std; 5 | 6 | // ----------------- kDataFrame Batch Query ----------------- 7 | 8 | class kf_batchQuery { 9 | private: 10 | kmerDecoder *KD; 11 | kDataFrame *kFrame; 12 | unordered_map> results; 13 | 14 | void flush_results(); 15 | 16 | public: 17 | kf_batchQuery(colored_kDataFrame *ckFrame, string filename, map parse_params, 18 | int chunk_size = 500); 19 | 20 | kf_batchQuery(kDataFrame *kFrame, string filename, map parse_params, 21 | int chunk_size = 500); 22 | 23 | void next(); 24 | 25 | bool end(); 26 | 27 | unordered_map> get_transcripts(); 28 | 29 | }; 30 | 31 | // ----------------- colored kDataFrame Batch Query ----------------- 32 | 33 | class ckf_batchQuery { 34 | private: 35 | kmerDecoder *KD; 36 | colored_kDataFrame *ckFrame; 37 | unordered_map>> results; 38 | 39 | void flush_results(); 40 | 41 | public: 42 | ckf_batchQuery(colored_kDataFrame *ckFrame, string filename, map parse_params, 43 | int chunk_size = 500); 44 | 45 | void next(); 46 | 47 | bool end(); 48 | 49 | unordered_map>> get_transcripts(); 50 | 51 | }; -------------------------------------------------------------------------------- /kProcessor/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/kProcessor/__init__.py -------------------------------------------------------------------------------- /kProcessor/kDataFrameIterator.py: -------------------------------------------------------------------------------- 1 | class kDataFrameIterator: 2 | """ 3 | Base class for kDataFrame Iterator 4 | """ 5 | 6 | def next(self): 7 | """ 8 | Increment the iterator to the next kmer 9 | 10 | :return: kDataFrame Iterator pointing to the new kmer position 11 | :rtype: :class:`kProcessor.kDataFrameIterator` 12 | """ 13 | 14 | def getKmer(self): 15 | """ 16 | Get the kmer at the current iterator position 17 | 18 | :return: Kmer at the current position 19 | :rtype: string 20 | """ 21 | 22 | pass 23 | 24 | def getHashedKmer(self): 25 | """ 26 | Get the hash value of the kmer at the current iterator position 27 | 28 | :return: Kmer's hash value at the current position 29 | :rtype: integer 30 | """ 31 | 32 | pass 33 | 34 | def getCount(self): 35 | """ 36 | Get the count of the kmer at the current iterator position 37 | 38 | :return: kmer count 39 | :rtype: integer 40 | """ 41 | 42 | pass 43 | 44 | def setCount(self): 45 | """ 46 | Sets the count of the current kmer 47 | 48 | :return: True if succeeded, False if failed 49 | :rtype: boolean 50 | """ 51 | 52 | pass 53 | -------------------------------------------------------------------------------- /kProcessor/kmerRow.py: -------------------------------------------------------------------------------- 1 | class kmerRow(): 2 | kmer = str() 3 | hashedKmer = int() 4 | count = int() 5 | 6 | def __init__(self, kmer, hashedKmer, count): 7 | """ 8 | kmerRow class constructor. 9 | 10 | :param kmer: The kmer string 11 | :type kmer: str 12 | :param hashedKmer: 13 | :type hashedKmer: int 14 | :param count: The kmer count 15 | :type: int 16 | 17 | :return: kmerRow object with the predefined data. 18 | :rtype: :class:`kProcessor.kmerRow` 19 | """ 20 | pass 21 | 22 | -------------------------------------------------------------------------------- /swig_interfaces/HashUtils/hashutil.i: -------------------------------------------------------------------------------- 1 | using namespace std; 2 | class Hasher{ 3 | public: 4 | virtual uint64_t hash(string key){return 0;}; 5 | virtual uint64_t hash(uint64_t key){return 0;}; 6 | virtual string Ihash(uint64_t key){ 7 | throw logic_error("Reverese Hash function is not/ cannot be implemented for this hash function."); 8 | } 9 | virtual Hasher* clone(){return this;}; 10 | }; 11 | 12 | // TwoBitsHasher 13 | class TwoBitsHasher: public Hasher{ 14 | private: 15 | uint64_t kSize; 16 | public: 17 | TwoBitsHasher(uint64_t kSize); 18 | Hasher* clone() { return new TwoBitsHasher(kSize);} 19 | uint64_t hash(string key); 20 | uint64_t hash(uint64_t key); 21 | string Ihash(uint64_t key); 22 | }; 23 | -------------------------------------------------------------------------------- /swig_interfaces/Utils/kmer.i: -------------------------------------------------------------------------------- 1 | class kmer { 2 | public: 3 | static uint64_t str_to_int(string str); 4 | static uint64_t str_to_canonical_int(string str); 5 | static string canonicalKmer(string k); 6 | static string int_to_str(uint64_t kmer, uint32_t K); 7 | static uint64_t reverse_complement(uint64_t kmer, uint32_t K); 8 | private: 9 | kmer(); 10 | }; 11 | -------------------------------------------------------------------------------- /swig_interfaces/algorithms/algorithms.i: -------------------------------------------------------------------------------- 1 | namespace kProcessor{ 2 | 3 | kDataFrame* kFrameUnion(const vector& input); 4 | kDataFrame* kFrameIntersect(const vector& input); 5 | kDataFrame* kFrameDiff(const vector& input); 6 | void countKmersFromFile(kDataFrame * kframe, string filename, int chunk_size = 1000); 7 | void countKmersFromString(string sequence,kDataFrame* output); 8 | 9 | colored_kDataFrame * index(kDataFrame * frame, string filename, int chunk_size, string names_fileName); 10 | } -------------------------------------------------------------------------------- /swig_interfaces/batchQuery.i: -------------------------------------------------------------------------------- 1 | // ----------------- kDataFrame Batch Query ----------------- 2 | 3 | class kf_batchQuery { 4 | 5 | public: 6 | kf_batchQuery(colored_kDataFrame *ckFrame, string filename, map parse_params, 7 | int chunk_size = 500); 8 | 9 | kf_batchQuery(kDataFrame *kFrame, string filename, map parse_params, 10 | int chunk_size = 500); 11 | 12 | void next(); 13 | 14 | bool end(); 15 | 16 | unordered_map> get_transcripts(); 17 | 18 | }; 19 | 20 | // ----------------- colored kDataFrame Batch Query ----------------- 21 | 22 | class ckf_batchQuery { 23 | 24 | public: 25 | ckf_batchQuery(colored_kDataFrame *ckFrame, string filename, map parse_params, 26 | int chunk_size = 500); 27 | 28 | void next(); 29 | 30 | bool end(); 31 | 32 | unordered_map>> get_transcripts(); 33 | 34 | }; -------------------------------------------------------------------------------- /swig_interfaces/colorTable.i: -------------------------------------------------------------------------------- 1 | class colorTable{ 2 | public: 3 | colorTable(); 4 | virtual ~colorTable(); 5 | static colorTable* load(string folderName); 6 | virtual bool getSamples(uint64_t colorID,vector& res)=0; 7 | virtual bool setColor(uint64_t colorID,vector& v)=0; 8 | virtual void save(string folderName)=0; 9 | uint64_t numSamples; 10 | uint32_t numColors; 11 | 12 | }; 13 | 14 | class colorTableInv{ 15 | public: 16 | colorTableInv(); 17 | virtual ~colorTableInv(); 18 | virtual uint64_t getColorId(vector& )=0; 19 | virtual void setColorId(uint64_t colorID,vector& v)=0; 20 | }; 21 | 22 | 23 | class intVectorsTable: public colorTable{ 24 | public: 25 | intVectorsTable(){} 26 | intVectorsTable(string folderName); 27 | //BitVectorsTable(vector fileNames,uint64_t numSamples); 28 | virtual ~intVectorsTable(); 29 | bool getSamples(uint64_t colorID,vector& res)override; 30 | bool setColor(uint64_t colorID,vector& v)override; 31 | void save(string folderName)override; 32 | }; 33 | -------------------------------------------------------------------------------- /swig_interfaces/colored_kDataFrame.i: -------------------------------------------------------------------------------- 1 | class colored_kDataFrame{ 2 | public: 3 | colored_kDataFrame(); 4 | void addNewColor(uint32_t color, vector & samplesIds); 5 | void setColor(string kmer,uint32_t color); 6 | uint32_t getColor(string kmer); 7 | vector getKmerSource(string kmer); 8 | vector getKmerSourceFromColor(uint32_t color); 9 | 10 | void colorKmer(string kmer,vector & samplesIds); 11 | 12 | void setColorTable(colorTable* table); 13 | void setkDataFrame(kDataFrame* f); 14 | void save(string prefix); 15 | static colored_kDataFrame* load(string prefix); 16 | uint64_t getkSize(); 17 | 18 | // Converting phmap to unordered_map, mainly for the python interface 19 | unordered_map names_map(); 20 | unordered_map inverse_names_map(); 21 | 22 | // Get the kDataFrame of the colored_kDataFrame 23 | kDataFrame * getkDataFrame(); 24 | }; 25 | -------------------------------------------------------------------------------- /swig_interfaces/kDataFrame/kDataFrameBMQF.i: -------------------------------------------------------------------------------- 1 | class kDataFrameBMQF: public kDataFrame{ 2 | public: 3 | 4 | kDataFrameBMQF(uint64_t kSize); 5 | kDataFrameBMQF(readingModes RM, hashingModes HM, map params); 6 | kDataFrameBMQF(uint64_t ksize,uint8_t q,uint8_t fixedCounterSize,uint8_t tagSize,double falsePositiveRate); 7 | kDataFrameBMQF(bufferedMQF* bufferedmqf,uint64_t ksize,double falsePositiveRate); 8 | 9 | ~kDataFrameBMQF(){ 10 | bufferedMQF_destroy(bufferedmqf); 11 | delete bufferedmqf; 12 | } 13 | 14 | void reserve (uint64_t n); 15 | 16 | kDataFrame* getTwin(); 17 | 18 | bool insert(string kmer,uint64_t count); 19 | bool insert(string kmer); 20 | bool insert(uint64_t kmer,uint64_t count); 21 | bool insert(uint64_t kmer); 22 | bool setCount(string kmer,uint64_t count); 23 | bool setCount(uint64_t kmer, uint64_t count); 24 | 25 | uint64_t getCount(string kmer); 26 | uint64_t getCount(uint64_t kmer); 27 | 28 | 29 | bool erase(string kmer); 30 | bool erase(uint64_t kmer); 31 | 32 | uint64_t size(); 33 | 34 | uint64_t max_size(); 35 | float load_factor(); 36 | float max_load_factor(); 37 | 38 | 39 | bufferedMQF* getBMQF(){ 40 | return bufferedmqf; 41 | } 42 | 43 | void save(string filePath); 44 | static kDataFrame* load(string filePath); 45 | 46 | kDataFrameIterator begin(); 47 | kDataFrameIterator end(); 48 | kDataFrameIterator find(string kmer); 49 | }; -------------------------------------------------------------------------------- /swig_interfaces/kDataFrame/kDataFrameMAP.i: -------------------------------------------------------------------------------- 1 | class kDataFrameMAP : public kDataFrame 2 | { 3 | public: 4 | kDataFrameMAP(); 5 | kDataFrameMAP(uint64_t ksize); 6 | kDataFrameMAP(readingModes RM, hashingModes HM, map params); 7 | kDataFrame* getTwin(); 8 | void reserve (uint64_t n); 9 | 10 | bool setCount(string kmer, uint64_t count); 11 | bool insert(string kmer); 12 | bool insert(string kmer, uint64_t count); 13 | uint64_t getCount(string kmer); 14 | bool erase(string kmer); 15 | 16 | uint64_t size(); 17 | uint64_t max_size(); 18 | float load_factor(); 19 | float max_load_factor(); 20 | kDataFrameIterator begin(); 21 | kDataFrameIterator end(); 22 | 23 | uint64_t bucket(string kmer); 24 | void save(string filePath); 25 | static kDataFrame *load(string filePath); 26 | 27 | ~kDataFrameMAP() { 28 | this->MAP.clear(); 29 | } 30 | }; -------------------------------------------------------------------------------- /swig_interfaces/kDataFrame/kDataFrameMQF.i: -------------------------------------------------------------------------------- 1 | class kDataFrameMQF: public kDataFrame{ 2 | 3 | public: 4 | kDataFrameMQF(); 5 | kDataFrameMQF(uint64_t kSize); 6 | kDataFrameMQF(uint64_t kSize, int mode); 7 | kDataFrameMQF(uint64_t ksize, uint8_t q, hashingModes HM); 8 | kDataFrameMQF(readingModes RM, hashingModes HM, map params); 9 | kDataFrameMQF(uint64_t ksize,uint8_t q,uint8_t fixedCounterSize,uint8_t tagSize,double falsePositiveRate); 10 | 11 | ~kDataFrameMQF(){ 12 | qf_destroy(mqf); 13 | delete mqf; 14 | } 15 | 16 | void reserve (uint64_t n); 17 | 18 | kDataFrame* getTwin(); 19 | 20 | bool setCount(string kmer,uint64_t count); 21 | bool setCount(uint64_t kmer, uint64_t count); 22 | bool insert(string kmer,uint64_t count); 23 | bool insert(string kmer); 24 | bool insert(uint64_t kmer, uint64_t count); 25 | bool insert(uint64_t kmer); 26 | uint64_t getCount(string kmer); 27 | uint64_t getCount(uint64_t kmer); 28 | 29 | bool erase(string kmer); 30 | bool erase(uint64_t kmer); 31 | 32 | uint64_t size(); 33 | uint64_t max_size(); 34 | float load_factor(); 35 | float max_load_factor(); 36 | 37 | QF* getMQF(){ 38 | return mqf; 39 | } 40 | 41 | void save(string filePath); 42 | static kDataFrame* load(string filePath); 43 | 44 | kDataFrameIterator begin(); 45 | kDataFrameIterator end(); 46 | }; -------------------------------------------------------------------------------- /swig_interfaces/kDataFrame/kDataFramePHMAP.i: -------------------------------------------------------------------------------- 1 | class kDataFramePHMAP : public kDataFrame { 2 | public: 3 | kDataFramePHMAP(uint64_t ksize); 4 | kDataFramePHMAP(readingModes RM, hashingModes hash_mode, map params); 5 | kDataFrame* getTwin(); 6 | void reserve(uint64_t n); 7 | 8 | bool setCount(string kmer, uint64_t count); 9 | bool insert(string kmer); 10 | bool insert(string kmer, uint64_t count); 11 | uint64_t getCount(string kmer); 12 | bool erase(string kmer); 13 | 14 | uint64_t size(); 15 | uint64_t max_size(); 16 | float load_factor(); 17 | float max_load_factor(); 18 | kDataFrameIterator begin(); 19 | kDataFrameIterator end(); 20 | 21 | uint64_t bucket(string kmer); 22 | void save(string filePath); 23 | static kDataFrame* load(string filePath); 24 | 25 | ~kDataFramePHMAP() { this->MAP.clear(); } 26 | }; -------------------------------------------------------------------------------- /swig_interfaces/kDataFrame/kmerRow.i: -------------------------------------------------------------------------------- 1 | class kmerRow{ 2 | public: 3 | string kmer; 4 | uint64_t hashedKmer; 5 | uint64_t count; 6 | kmerRow(){ 7 | kmer=""; 8 | hashedKmer=0; 9 | count=0; 10 | } 11 | kmerRow(string kmer,uint64_t hashedKmer,uint64_t count) 12 | { 13 | this->kmer=kmer; 14 | this->hashedKmer=hashedKmer; 15 | this->count=count; 16 | } 17 | kmerRow(const kmerRow& other) 18 | { 19 | kmer=other.kmer; 20 | hashedKmer=other.hashedKmer; 21 | count=other.count; 22 | } 23 | 24 | kmerRow copy(const kmerRow& other) 25 | { 26 | return * (new kmerRow(other)); 27 | } 28 | 29 | bool operator == (kmerRow& other) 30 | { 31 | return hashedKmer==other.hashedKmer; 32 | } 33 | 34 | bool operator < (kmerRow& other) 35 | { 36 | return hashedKmer ( kmerRow& other) 39 | { 40 | return hashedKmer>other.hashedKmer; 41 | } 42 | bool operator < (const kmerRow& other) 43 | { 44 | return hashedKmer (const kmerRow& other) 47 | { 48 | return hashedKmer>other.hashedKmer; 49 | } 50 | 51 | }; -------------------------------------------------------------------------------- /swig_interfaces/modules/sys_args.i: -------------------------------------------------------------------------------- 1 | %typemap(in) (int argc, char **argv) { 2 | /* Check if is a list */ 3 | if (PyList_Check($input)) { 4 | int i; 5 | $1 = PyList_Size($input); 6 | $2 = (char **) malloc(($1+1)*sizeof(char *)); 7 | for (i = 0; i < $1; i++) { 8 | PyObject *o = PyList_GetItem($input, i); 9 | if (PyString_Check(o)) { 10 | $2[i] = PyString_AsString(PyList_GetItem($input, i)); 11 | } else { 12 | free($2); 13 | PyErr_SetString(PyExc_TypeError, "list must contain strings"); 14 | SWIG_fail; 15 | } 16 | } 17 | $2[i] = 0; 18 | } else { 19 | PyErr_SetString(PyExc_TypeError, "not a list"); 20 | SWIG_fail; 21 | } 22 | } 23 | 24 | %typemap(freearg) (int argc, char **argv) { 25 | free((char *) $2); 26 | } -------------------------------------------------------------------------------- /tests/kProcessorLibTests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB SRCS *.cpp) 2 | 3 | ADD_EXECUTABLE(testKprocessorLib ${SRCS}) 4 | 5 | 6 | 7 | TARGET_LINK_LIBRARIES(testKprocessorLib kProcessor MQF libgtest ${ntcardLib} ) 8 | 9 | add_test(NAME testKprocessorLib 10 | COMMAND testKprocessorLib) 11 | 12 | file(COPY ../testData/test.noN.fastq DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) 13 | file(COPY ../testData/test2.noN.fastq DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) 14 | file(COPY ../testData/test3.noN.fastq DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) 15 | file(COPY ../testData/test1.fa DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) 16 | file(COPY ../testData/test1.fa.names DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) 17 | file(COPY ../testData/test.noN.fastq.ntCardRes DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) 18 | file(COPY ../testData/test2.noN.fastq.ntCardRes DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) 19 | file(COPY ../testData/.stxxl DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) 20 | -------------------------------------------------------------------------------- /tests/kProcessorLibTests/main.cpp: -------------------------------------------------------------------------------- 1 | #include "gtest/gtest.h" 2 | #include 3 | #include "kDataFrame.hpp" 4 | #include "testkDataframe.h" 5 | using namespace std; 6 | 7 | 8 | 9 | 10 | int main(int argc, char **argv) 11 | { 12 | ::testing::InitGoogleTest(&argc, argv); 13 | 14 | 15 | 16 | int ret = RUN_ALL_TESTS(); 17 | return ret; 18 | } 19 | -------------------------------------------------------------------------------- /tests/python/params/__init__.py: -------------------------------------------------------------------------------- 1 | from .params import test_params -------------------------------------------------------------------------------- /tests/python/test_indexing.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dib-lab/kProcessor/7fe67ec22cd2ba77f8669ee8dee82f971d29cb30/tests/python/test_indexing.py -------------------------------------------------------------------------------- /tests/testData/.stxxl: -------------------------------------------------------------------------------- 1 | disk=/tmp/stxxl,4G,syscall unlink 2 | -------------------------------------------------------------------------------- /tests/testData/small.fa: -------------------------------------------------------------------------------- 1 | >SAMPLE 2 | ACGTAGCATGCATGACGATGCTAGCGTGATGCTAGCTAGTCAGTAGCATGC --------------------------------------------------------------------------------