ALP User Documentation  0.8.preview
Algebraic Programming User Documentation
Public Types | Static Public Member Functions | List of all members
Repeater< T > Class Template Reference

An iterator that repeats the same value for a set number of times. More...

Public Types

typedef grb::utils::internal::PosBasedIterator< T, T, Repeater< T > > RealType
 The return type of the factory methods.
 

Static Public Member Functions

static RealType make_iterator (const size_t count, const bool start, const T val, const size_t s=0, const size_t P=1)
 Constructs an iterator over a collection that contains the same constant value val count times. More...
 

Detailed Description

template<typename T>
class grb::utils::iterators::Repeater< T >

An iterator that repeats the same value for a set number of times.

This class implements a factory for retrieving repeater iterators.

Rather than using this iterator directly, however, users may want to refer to the grb::utils::containers::ConstantVector container instead.

Member Function Documentation

◆ make_iterator()

static RealType make_iterator ( const size_t  count,
const bool  start,
const T  val,
const size_t  s = 0,
const size_t  P = 1 
)
inlinestatic

Constructs an iterator over a collection that contains the same constant value val count times.

Parameters
[in]countHow many elements are in the collection.
[in]startWhether the constructed iterator is in start or end position.
[in]valThe constant value that should be returned count times.

The following are optional arguments for optionally creating parallel I/O iterators:

Parameters
[in]sThe process ID; default is zero.
[in]PThe number of processes; default is one.

The parameter s must be strictly smaller than P, and P must be larger than zero.


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