cds  2.3.2
cds::opt::v::skew_permutation< Generator > Class Template Reference

Skew permutation generator. More...

#include <cds/opt/permutation.h>

Public Types

typedef Generator base_generator
 Original permutation generator.
 
typedef base_generator::integer_type integer_type
 Type of generated value.
 

Public Member Functions

 skew_permutation (integer_type nOffset, size_t nLength)
 Initializes the generator. More...
 
 operator integer_type () const
 Returns the current value.
 
bool next ()
 Goes to next value. Returns false if the sequence is exhausted.
 
void reset ()
 Resets the generator to produce new sequence.
 

Detailed Description

template<typename Generator>
class cds::opt::v::skew_permutation< Generator >

Skew permutation generator.

This generator produces offset permutation based on Generator: int(Generator) + nOffset where Generator - a permutation generator.

The class is suitable for opt::permutation_generator option if the goal sequence should be a permutation of [nOffset, nOffset + nLength)

Constructor & Destructor Documentation

◆ skew_permutation()

template<typename Generator >
cds::opt::v::skew_permutation< Generator >::skew_permutation ( integer_type  nOffset,
size_t  nLength 
)
inline

Initializes the generator.

Parameters
nOffsetThe offset, i.e. first value of generated sequence
nLengthThe length of sequence

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

cds 2.3.2 Developed by Maxim Khizhinsky aka khizmax and other contributors 2007 - 2017
Autogenerated Sun Dec 31 2017 12:10:52 by Doxygen 1.8.13