/*
 * BWTBinarySearch.cpp
 *
 *  Created on: 17. 02. 2021
 *      Author: Martin Prokopic
 */

#include <registration/AlgoRegistration.hpp>
#include "BWTBinarySearch.h"

namespace {

auto BWTBinarySearch = registration::AbstractRegister < stringology::exact::BWTBinarySearch,
        ext::set < unsigned int >,
        const string::LinearStringTerminatingSymbolBWT < > &,
        const string::LinearString < > & > ( stringology::exact::BWTBinarySearch::match ).setDocumentation (
        "Use binary search to find occurrences of pattern in subject (a BWT encoded string).\n"
        "\n"
        "@tparam SymbolType\n"
        "@param subject the input BWT-encoded string\n"
        "@param pattern the pattern to search for\n"
        "@return indices of occurrences of pattern in the original (decoded) text, starting at 0" );

auto BWTBinarySearchWithData = registration::AbstractRegister < stringology::exact::BWTBinarySearch,
        ext::set < unsigned int >,
        const string::LinearStringTerminatingSymbolBWT < > &,
        const string::LinearString < > &,
        const indexes::stringology::BWTAuxiliaryData < > & > ( stringology::exact::BWTBinarySearch::match ).setDocumentation (
        "Use binary search to find occurrences of pattern in subject (a BWT encoded string), reusing precomputed auxiliary data.\n"
        "Required data types are M_OCC_PREFIX_SUM, W_FORWARD_DECODE and I_FIRST_TO_TEXT.\n"
        "\n"
        "@tparam SymbolType\n"
        "@param subject the input BWT-encoded string\n"
        "@param pattern the pattern to search for\n"
        "@param data precomputed auxiliary data\n"
        "@return indices of occurrences of pattern in the original (decoded) text, starting at 0" );

} /* namespace */
