/*
 * SimpleFMIndexConstruct.cpp
 *
 *  Created on: 26. 02. 2021
 *      Author: Martin Prokopic
 */

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

namespace {

auto SimpleFMIndexConstruct = registration::AbstractRegister <
        stringology::indexing::SimpleFMIndexConstruct,
        indexes::stringology::SimpleFMIndex < >,
        const string::LinearStringTerminatingSymbolBWT < > & > (
        stringology::indexing::SimpleFMIndexConstruct::construct ).setDocumentation (
        "Construct fat Simple FM Index from BWT-encoded string using default bucket sizes and marker density.\n"
        "\n"
        "@tparam SymbolType\n"
        "@param str the input BWT-encoded string\n"
        "@return the Simple FM Index instance" );

auto SimpleFMIndexConstructWithSizes = registration::AbstractRegister <
        stringology::indexing::SimpleFMIndexConstruct,
        indexes::stringology::SimpleFMIndex < >,
        const string::LinearStringTerminatingSymbolBWT < > &,
        unsigned, unsigned, unsigned > (
        stringology::indexing::SimpleFMIndexConstruct::construct ).setDocumentation (
        "Construct Simple FM Index from BWT-encoded string using custom bucket size and marker density.\n"
        "\n"
        "@tparam SymbolType\n"
        "@param str the input BWT-encoded string\n"
        "@param bucketSize the non-zero bucket size\n"
        "@param superBucketSize the non-zero super bucket size. Must be a multiple of bucketSize.\n"
        "@param fttDensityPct wanted density of marked rows in %. If 0, the index will support only the Count operation.\n"
        "@return the Simple FM Index instance" );

auto SimpleFMIndexConstructWithSizesAndData = registration::AbstractRegister <
        stringology::indexing::SimpleFMIndexConstruct,
        indexes::stringology::SimpleFMIndex < >,
        const string::LinearStringTerminatingSymbolBWT < > &,
        unsigned, unsigned, unsigned,
        const indexes::stringology::BWTAuxiliaryData < > & > (
        stringology::indexing::SimpleFMIndexConstruct::construct ).setDocumentation (
        "Construct Simple FM Index from BWT-encoded string using custom bucket size and marker density, reusing precomputed auxiliary data.\n"
        "Required data types are M_OCC_PREFIX_SUM and I_FIRST_TO_TEXT (if fttDensityPct > 0, thus creating a fat index).\n"
        "\n"
        "@tparam SymbolType\n"
        "@param str the input BWT-encoded string\n"
        "@param bucketSize the non-zero bucket size\n"
        "@param superBucketSize the non-zero super bucket size. Must be a multiple of bucketSize.\n"
        "@param fttDensityPct wanted density of marked rows in %. If 0, the index will support only the Count operation.\n"
        "@param data precomputed auxiliary data\n"
        "@return the Simple FM Index instance" );

} /* namespace */