SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
benchmax::RandomizationAdaptor< T > Class Template Reference

Provides iteration over a given std::vector in a pseudo-randomized order. More...

#include <Jobs.h>

Data Structures

struct  iterator
 

Public Member Functions

 RandomizationAdaptor (const std::vector< T > &data)
 Construct a randomized view on the given vector. More...
 
auto begin () const
 Return begin of the randomized range. More...
 
auto end () const
 Return end of the randomized range. More...
 

Private Attributes

const std::vector< T > & mData
 
std::size_t mFactor
 

Detailed Description

template<typename T>
class benchmax::RandomizationAdaptor< T >

Provides iteration over a given std::vector in a pseudo-randomized order.

Internally, it computes a factor that is coprime to the number of jobs (and thus generates all indices). We choose the factor in the order of the square root of the number of jobs.

Definition at line 20 of file Jobs.h.

Constructor & Destructor Documentation

◆ RandomizationAdaptor()

template<typename T >
benchmax::RandomizationAdaptor< T >::RandomizationAdaptor ( const std::vector< T > &  data)
inline

Construct a randomized view on the given vector.

Definition at line 51 of file Jobs.h.

Here is the call graph for this function:

Member Function Documentation

◆ begin()

template<typename T >
auto benchmax::RandomizationAdaptor< T >::begin ( ) const
inline

Return begin of the randomized range.

Definition at line 58 of file Jobs.h.

◆ end()

template<typename T >
auto benchmax::RandomizationAdaptor< T >::end ( ) const
inline

Return end of the randomized range.

Definition at line 62 of file Jobs.h.

Field Documentation

◆ mData

template<typename T >
const std::vector<T>& benchmax::RandomizationAdaptor< T >::mData
private

Definition at line 47 of file Jobs.h.

◆ mFactor

template<typename T >
std::size_t benchmax::RandomizationAdaptor< T >::mFactor
private

Definition at line 48 of file Jobs.h.


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