SG++-Doxygen-Documentation
sgpp::datadriven::DataShufflingFunctorRandom Class Reference

A simple shuffling functor for data samples that performs a random shuffling of the data. More...

#include <DataShufflingFunctorRandom.hpp>

Inheritance diagram for sgpp::datadriven::DataShufflingFunctorRandom:
sgpp::datadriven::DataShufflingFunctor

Public Member Functions

DataShufflingFunctorclone () const override
 Clone pattern. More...
 
 DataShufflingFunctorRandom (int64_t seed=1337)
 Standard constructor. More...
 
size_t operator() (size_t idx, size_t numSamples) override
 Overload the function-call operator that maps indexes to indexes via a permutation of the entire index set. More...
 
- Public Member Functions inherited from sgpp::datadriven::DataShufflingFunctor
 DataShufflingFunctor ()
 
 DataShufflingFunctor (const DataShufflingFunctor &rhs)=default
 
 DataShufflingFunctor (DataShufflingFunctor &&rhs)=default
 
DataShufflingFunctoroperator= (const DataShufflingFunctor &rhs)=default
 
DataShufflingFunctoroperator= (DataShufflingFunctor &&rhs)=default
 
virtual ~DataShufflingFunctor ()=default
 

Detailed Description

A simple shuffling functor for data samples that performs a random shuffling of the data.

A Feistel network is used to compute the permutation of [0...N-1] without linear memory complexity.

Constructor & Destructor Documentation

◆ DataShufflingFunctorRandom()

sgpp::datadriven::DataShufflingFunctorRandom::DataShufflingFunctorRandom ( int64_t  seed = 1337)
explicit

Standard constructor.

Parameters
seedthe seed for the random shuffling (seed == -1 corresponds to a random seed)

References python.statsfileInfo::i.

Member Function Documentation

◆ clone()

DataShufflingFunctor * sgpp::datadriven::DataShufflingFunctorRandom::clone ( ) const
overridevirtual

Clone pattern.

Returns
identical copy of this instance

Implements sgpp::datadriven::DataShufflingFunctor.

References python.statsfileInfo::i.

◆ operator()()

size_t sgpp::datadriven::DataShufflingFunctorRandom::operator() ( size_t  idx,
size_t  numSamples 
)
overridevirtual

Overload the function-call operator that maps indexes to indexes via a permutation of the entire index set.

The permutation used is the identity.

Parameters
idxthe original index
numSamplesthe number of indexes to permute in total
Returns
idx the index after the permutation (simply the input)

Implements sgpp::datadriven::DataShufflingFunctor.


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