Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Catch::Generators::RandomFloatingGenerator< Float > Class Template Referencefinal

#include <catch_generators_specific.hpp>

Inheritance diagram for Catch::Generators::RandomFloatingGenerator< Float >:
Collaboration diagram for Catch::Generators::RandomFloatingGenerator< Float >:

Public Member Functions

 RandomFloatingGenerator (Float a, Float b)
 
Float const & get () const override
 
bool next () override
 
 RandomFloatingGenerator (Float a, Float b)
 
Float const & get () const override
 
bool next () override
 
- Public Member Functions inherited from Catch::Generators::IGenerator< Float >
virtual ~IGenerator ()=default
 
virtual ~IGenerator ()=default
 
- Public Member Functions inherited from Catch::Generators::GeneratorUntypedBase
 GeneratorUntypedBase ()=default
 
virtual ~GeneratorUntypedBase ()
 
 GeneratorUntypedBase ()=default
 
virtual ~GeneratorUntypedBase ()
 

Additional Inherited Members

- Public Types inherited from Catch::Generators::IGenerator< Float >
using type
 

Detailed Description

template<typename Float>
class Catch::Generators::RandomFloatingGenerator< Float >

Definition at line 4058 of file catch.hpp.

Constructor & Destructor Documentation

◆ RandomFloatingGenerator() [1/2]

template<typename Float >
Catch::Generators::RandomFloatingGenerator< Float >::RandomFloatingGenerator ( Float a,
Float b )
inline

Definition at line 27 of file catch_generators_specific.hpp.

27 :
28 m_rand(getCurrentContext().getConfig()->rngSeed()),
29 m_dist(a, b) {
30 static_cast<void>(next());
31 }
IContext & getCurrentContext()
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1181
Here is the call graph for this function:

◆ RandomFloatingGenerator() [2/2]

template<typename Float >
Catch::Generators::RandomFloatingGenerator< Float >::RandomFloatingGenerator ( Float a,
Float b )
inline

Definition at line 4065 of file catch.hpp.

4065 :
4066 m_rand(getCurrentContext().getConfig()->rngSeed()),
4067 m_dist(a, b) {
4068 static_cast<void>(next());
4069 }
Here is the call graph for this function:

Member Function Documentation

◆ get() [1/2]

template<typename Float >
Float const & Catch::Generators::RandomFloatingGenerator< Float >::get ( ) const
inlineoverridevirtual

Implements Catch::Generators::IGenerator< Float >.

Definition at line 33 of file catch_generators_specific.hpp.

33 {
34 return m_current_number;
35 }

◆ get() [2/2]

template<typename Float >
Float const & Catch::Generators::RandomFloatingGenerator< Float >::get ( ) const
inlineoverridevirtual

Implements Catch::Generators::IGenerator< Float >.

Definition at line 4071 of file catch.hpp.

4071 {
4072 return m_current_number;
4073 }

◆ next() [1/2]

template<typename Float >
bool Catch::Generators::RandomFloatingGenerator< Float >::next ( )
inlineoverridevirtual

Implements Catch::Generators::GeneratorUntypedBase.

Definition at line 36 of file catch_generators_specific.hpp.

36 {
37 m_current_number = m_dist(m_rand);
38 return true;
39 }
Here is the caller graph for this function:

◆ next() [2/2]

template<typename Float >
bool Catch::Generators::RandomFloatingGenerator< Float >::next ( )
inlineoverridevirtual

Implements Catch::Generators::GeneratorUntypedBase.

Definition at line 4074 of file catch.hpp.

4074 {
4075 m_current_number = m_dist(m_rand);
4076 return true;
4077 }

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