Program Listing for File Nondeterminism.h
↰ Return to documentation for file (ADS/complexity/Nondeterminism.h)
/*--------------------------------------------------------------------------*/
/*------------------------- File Nondeterminism.h --------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/
#ifndef __ADS_Nondeterminism
#define __ADS_Nondeterminism
/* self-identification: #endif constant */
/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/Contract.h"
#include <cstddef>
#include <vector>
/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace ADS {
class Chooser {
/*--------------------------------------------------------------------------*/
public:
int choice( int k );
template< class A >
bool run( A && alg , long * runs = nullptr );
[[nodiscard]] std::vector< int > choices( void ) const;
/*--------------------------------------------------------------------------*/
private:
std::vector< std::pair< int , int > > f_path;
std::size_t f_depth = 0;
}; // end( class Chooser )
/*--------------------------------------------------------------------------*/
} // end( namespace ADS )
/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/complexity/impl/Nondeterminism.tpp"
/*--------------------------------------------------------------------------*/
#endif /* Nondeterminism.h included */
/*--------------------------------------------------------------------------*/
/*----------------------- End File Nondeterminism.h ------------------------*/
/*--------------------------------------------------------------------------*/