Program Listing for File FastGeneration.h
↰ Return to documentation for file (ADS/combinatorial/FastGeneration.h)
/*--------------------------------------------------------------------------*/
/*------------------------- File FastGeneration.h --------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/
#ifndef __ADS_FastGeneration
#define __ADS_FastGeneration
/* self-identification: #endif constant */
/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/Contract.h"
#include "ADS/combinatorial/Bitwise.h"
#include <algorithm>
#include <bit>
#include <cstdint>
#include <type_traits>
#include <utility>
#include <vector>
/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace ADS {
template< class T , class F >
long forEachPermutation( std::vector< T > & a , F && visit );
template< class T , class F >
long forEachPermutationLex( std::vector< T > & a , F && visit );
template< class F >
long forEachCombination( int n , int t , F && visit );
[[nodiscard]] constexpr Word nextCombination( Word x );
template< class F >
long forEachCombinationMask( int n , int t , F && visit );
/*--------------------------------------------------------------------------*/
} // end( namespace ADS )
/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/combinatorial/impl/FastGeneration.tpp"
/*--------------------------------------------------------------------------*/
#endif /* FastGeneration.h included */
/*--------------------------------------------------------------------------*/
/*----------------------- End File FastGeneration.h ------------------------*/
/*--------------------------------------------------------------------------*/