Twitch SDK (Internal)
Public Types | Static Public Member Functions | List of all members
ttv::CyclingGenerator< InputGenerator, SamplingInterval > Struct Template Reference

#include <dsputilities.h>

Public Types

using ReturnType = typename InputGenerator::ReturnType
 

Static Public Member Functions

static ReturnType Generate (size_t index, size_t length)
 

Detailed Description

template<typename InputGenerator, size_t SamplingInterval>
struct ttv::CyclingGenerator< InputGenerator, SamplingInterval >

Reorders the entries returned by the function to sample every Nth interval, and then loop, increasing the offset each time. For example, if the sampling interval is 3 over a length of 12, the new values would come from these indexes: 0, 3, 6, 9, 1, 4, 7, 10, 2, 5, 8, 11

Member Typedef Documentation

◆ ReturnType

template<typename InputGenerator , size_t SamplingInterval>
using ttv::CyclingGenerator< InputGenerator, SamplingInterval >::ReturnType = typename InputGenerator::ReturnType

Member Function Documentation

◆ Generate()

template<typename InputGenerator , size_t SamplingInterval>
static ReturnType ttv::CyclingGenerator< InputGenerator, SamplingInterval >::Generate ( size_t  index,
size_t  length 
)
inlinestatic

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