Program Listing for File Lyndon.h
↰ Return to documentation for file (ADS/string/Lyndon.h)
/*--------------------------------------------------------------------------*/
/*----------------------------- File Lyndon.h ------------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/
#ifndef __ADS_Lyndon
#define __ADS_Lyndon
/* self-identification: #endif constant */
/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/Contract.h"
#include <cstddef>
#include <string_view>
#include <vector>
/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace ADS {
[[nodiscard]] inline bool isLyndon( std::string_view S );
[[nodiscard]] inline std::vector< std::size_t > lyndonFactorization(
std::string_view S );
[[nodiscard]] inline std::size_t leastRotation( std::string_view S );
/*--------------------------------------------------------------------------*/
} // end( namespace ADS )
/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/string/impl/Lyndon.tpp"
/*--------------------------------------------------------------------------*/
#endif /* Lyndon.h included */
/*--------------------------------------------------------------------------*/
/*--------------------------- End File Lyndon.h ----------------------------*/
/*--------------------------------------------------------------------------*/