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

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

namespace {

auto BWTDecode = registration::AbstractRegister <
        stringology::transform::BWTDecode,
        string::LinearString < >,
        const string::LinearStringTerminatingSymbolBWT < > & > (
        stringology::transform::BWTDecode::decode ).setDocumentation (
        "Decode a BWT-encoded string and remove terminating symbol.\n"
        "\n"
        "@tparam SymbolType\n"
        "@param str the input BWT-encoded string\n"
        "@return the decoded string with removed terminating symbol" );

auto BWTDecodeWithData = registration::AbstractRegister <
        stringology::transform::BWTDecode,
        string::LinearString < >,
        const string::LinearStringTerminatingSymbolBWT < > &,
        const indexes::stringology::BWTAuxiliaryData < > & > (
        stringology::transform::BWTDecode::decode ).setDocumentation (
        "Decode a BWT-encoded string and remove terminating symbol, reusing precomputed auxiliary data.\n"
        "This implementation uses the M and C arrays. Required data type is M_OCC_PREFIX_SUM.\n"
        "\n"
        "@tparam SymbolType\n"
        "@param str the input BWT-encoded string\n"
        "@param data precomputed auxiliary data\n"
        "@return the decoded string with removed terminating symbol" );

} /* namespace */
