Program Listing for File StringBreaking.h
↰ Return to documentation for file (ADS/string/StringBreaking.h)
/*--------------------------------------------------------------------------*/
/*------------------------- File StringBreaking.h --------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/
#ifndef __ADS_StringBreaking
#define __ADS_StringBreaking
/* self-identification: #endif constant */
/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/Contract.h"
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <set>
#include <type_traits>
#include <utility>
#include <vector>
/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace ADS {
template< class I >
[[nodiscard]] I stringBreakingCost( const std::vector< I > & cuts ,
std::type_identity_t< I > length );
[[nodiscard]] inline std::int64_t stringBreakingCost(
const std::vector< std::int64_t > & cuts , std::int64_t length );
template< class I >
[[nodiscard]] std::vector< I > stringBreakingOrder(
const std::vector< I > & cuts , std::type_identity_t< I > length );
[[nodiscard]] inline std::vector< std::int64_t > stringBreakingOrder(
const std::vector< std::int64_t > & cuts , std::int64_t length );
/*--------------------------------------------------------------------------*/
} // end( namespace ADS )
/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/string/impl/StringBreaking.tpp"
/*--------------------------------------------------------------------------*/
#endif /* StringBreaking.h included */
/*--------------------------------------------------------------------------*/
/*----------------------- End File StringBreaking.h ------------------------*/
/*--------------------------------------------------------------------------*/