Kernel Tuning Toolkit 2.3
 
Loading...
Searching...
No Matches
ktt::McmcSearcher Class Reference

#include <McmcSearcher.h>

Inheritance diagram for ktt::McmcSearcher:
ktt::Searcher

Public Member Functions

 McmcSearcher (const KernelConfiguration &start={})
 
 McmcSearcher (const std::vector< double > &start)
 
void OnInitialize () override
 
void OnReset () override
 
bool CalculateNextConfiguration (const KernelResult &previousResult) override
 
KernelConfiguration GetCurrentConfiguration () const override
 
- Public Member Functions inherited from ktt::Searcher
virtual ~Searcher ()=default
 
 Searcher ()
 
KernelConfiguration GetConfiguration (const uint64_t index) const
 
uint64_t GetIndex (const KernelConfiguration &configuration) const
 
KernelConfiguration GetRandomConfiguration () const
 
std::vector< KernelConfigurationGetNeighbourConfigurations (const KernelConfiguration &configuration, const uint64_t maxDifferences, const size_t maxNeighbours=3) const
 
uint64_t GetConfigurationsCount () const
 
uint64_t GetUnexploredConfigurationsCount () const
 
const std::set< uint64_t > & GetExploredIndices () const
 
bool IsInitialized () const
 
void Initialize (const ConfigurationData &data)
 
void Reset ()
 

Detailed Description

Searcher which explores configurations using Markov chain Monte Carlo method.

Constructor & Destructor Documentation

◆ McmcSearcher() [1/2]

ktt::McmcSearcher::McmcSearcher ( const KernelConfiguration start = {})

Initializes MCMC searcher.

Parameters
startOptional parameter which specifies the starting point for MCMC searcher.

◆ McmcSearcher() [2/2]

ktt::McmcSearcher::McmcSearcher ( const std::vector< double > &  start)

Initializes MCMC searcher.

Deprecated:
Use constructor which accepts kernel configuration.
Parameters
startOptional parameter which specifies starting point for MCMC searcher.

Member Function Documentation

◆ CalculateNextConfiguration()

bool ktt::McmcSearcher::CalculateNextConfiguration ( const KernelResult previousResult)
overridevirtual

Calculates the configuration which will be run next. Called after processing the current configuration if there are any remaining unexplored configurations.

Parameters
previousResultResult from the last tested configuration. See KernelResult for more information.
Returns
True if the next configuration was successfully calculated, false otherwise. If false is returned, configuration space exploration will be stopped.

Implements ktt::Searcher.

◆ GetCurrentConfiguration()

KernelConfiguration ktt::McmcSearcher::GetCurrentConfiguration ( ) const
overridevirtual

Returns current kernel configuration. Note that this may be called repeatedly before calculating next configuration. In that case, the returned configuration must always be the same.

Returns
Current configuration.

Implements ktt::Searcher.

◆ OnInitialize()

void ktt::McmcSearcher::OnInitialize ( )
overridevirtual

Called after searcher is initialized with kernel configurations. The first kernel configuration as well as custom searcher parameters should be initialized here.

Reimplemented from ktt::Searcher.

◆ OnReset()

void ktt::McmcSearcher::OnReset ( )
overridevirtual

Called before searcher is reset to initial state and configurations are removed. Custom searcher parameters should be reset here.

Reimplemented from ktt::Searcher.


The documentation for this class was generated from the following file: