Program Listing for File Segmentations.h

↰ Return to documentation for file (ADS/string/Segmentations.h)

/*--------------------------------------------------------------------------*/
/*-------------------------- File Segmentations.h --------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/

#ifndef __ADS_Segmentations
 #define __ADS_Segmentations
                      /* self-identification: #endif constant */

/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/

#include "ADS/Contract.h"

#include <cstddef>
#include <cstdint>
#include <string>
#include <type_traits>
#include <vector>

/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/

namespace ADS {

template< class S > requires std::is_class_v< S >
[[nodiscard]] std::uint64_t countSegmentations(
                             const S & X , const std::vector< S > & words );

[[nodiscard]] inline std::uint64_t countSegmentations(
            const std::string & X , const std::vector< std::string > & words );

[[nodiscard]] inline std::uint64_t countDecodings(
                                           const std::vector< int > & digits );

/*--------------------------------------------------------------------------*/

}  // end( namespace ADS )

/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/

#include "ADS/string/impl/Segmentations.tpp"

/*--------------------------------------------------------------------------*/

#endif  /* Segmentations.h included */

/*--------------------------------------------------------------------------*/
/*------------------------ End File Segmentations.h ------------------------*/
/*--------------------------------------------------------------------------*/