ZeroErr
zeroerr::ElementOf< T > Class Template Reference

#include <element_of.h>

Inheritance diagram for zeroerr::ElementOf< T >:
Collaboration diagram for zeroerr::ElementOf< T >:

Public Types

using ValueType = T
 
using CorpusType = uint64_t
 

Public Member Functions

 ElementOf (std::vector< T > elements)
 
CorpusType GetRandomCorpus (Rng &rng) override
 
ValueType GetValue (const CorpusType &v) const override
 
CorpusType FromValue (const ValueType &v) const override
 
void Mutate (Rng &rng, CorpusType &v, bool only_shrink) const override
 
- Public Member Functions inherited from zeroerr::Domain< T, uint64_t >
virtual ~Domain ()=default
 
virtual uint64_t GetRandomCorpus (Rng &rng) const=0
 
virtual T GetRandomValue (Rng &rng) const
 
virtual uint64_t ParseCorpus (IRObject v) const
 
virtual IRObject SerializeCorpus (const uint64_t &v) const
 

Public Attributes

std::vector< T > elements
 

Member Typedef Documentation

◆ CorpusType

template<typename T >
using zeroerr::ElementOf< T >::CorpusType = uint64_t

◆ ValueType

template<typename T >
using zeroerr::ElementOf< T >::ValueType = T

Constructor & Destructor Documentation

◆ ElementOf()

template<typename T >
zeroerr::ElementOf< T >::ElementOf ( std::vector< T >  elements)
inline

Member Function Documentation

◆ FromValue()

template<typename T >
CorpusType zeroerr::ElementOf< T >::FromValue ( const ValueType v) const
inlineoverridevirtual

◆ GetRandomCorpus()

template<typename T >
CorpusType zeroerr::ElementOf< T >::GetRandomCorpus ( Rng rng)
inlineoverride

◆ GetValue()

template<typename T >
ValueType zeroerr::ElementOf< T >::GetValue ( const CorpusType v) const
inlineoverridevirtual

◆ Mutate()

template<typename T >
void zeroerr::ElementOf< T >::Mutate ( Rng rng,
CorpusType v,
bool  only_shrink 
) const
inlineoverridevirtual

Member Data Documentation

◆ elements

template<typename T >
std::vector<T> zeroerr::ElementOf< T >::elements

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