Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
Catch::Generators::Generator< T > Class Template Reference

#include <catch.hpp>

Public Member Functions

 Generator (size_t size, std::unique_ptr< IGenerator< T >> generator)
 
auto size () const -> size_t
 
auto operator[] (size_t index) const -> T
 

Private Attributes

std::unique_ptr< IGenerator< T > > m_generator
 
size_t m_size
 

Detailed Description

template<typename T>
class Catch::Generators::Generator< T >

Definition at line 3111 of file catch.hpp.

Constructor & Destructor Documentation

template<typename T>
Catch::Generators::Generator< T >::Generator ( size_t  size,
std::unique_ptr< IGenerator< T >>  generator 
)
inline

Definition at line 3116 of file catch.hpp.

3117  : m_generator( std::move( generator ) ),
3118  m_size( size )
3119  {}
std::unique_ptr< IGenerator< T > > m_generator
Definition: catch.hpp:3112
auto size() const -> size_t
Definition: catch.hpp:3121

Member Function Documentation

template<typename T>
auto Catch::Generators::Generator< T >::operator[] ( size_t  index) const -> T
inline

Definition at line 3122 of file catch.hpp.

References Catch::Generators::randomiseIndices().

3122  {
3123  assert( index < m_size );
3124  return m_generator->get( index );
3125  }
std::unique_ptr< IGenerator< T > > m_generator
Definition: catch.hpp:3112
template<typename T>
auto Catch::Generators::Generator< T >::size ( ) const -> size_t
inline

Definition at line 3121 of file catch.hpp.

3121 { return m_size; }

Member Data Documentation

template<typename T>
std::unique_ptr<IGenerator<T> > Catch::Generators::Generator< T >::m_generator
private

Definition at line 3112 of file catch.hpp.

template<typename T>
size_t Catch::Generators::Generator< T >::m_size
private

Definition at line 3113 of file catch.hpp.


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