ZeroErr
zeroerr::Domain< ValueType, CorpusType > Class Template Referenceabstract

Domain class for generating random values of a specific type. More...

#include <domain.h>

Inheritance diagram for zeroerr::Domain< ValueType, CorpusType >:

Public Member Functions

virtual ~Domain ()=default
 
virtual CorpusType GetRandomCorpus (Rng &rng) const =0
 
virtual ValueType GetRandomValue (Rng &rng) const
 
virtual CorpusType FromValue (const ValueType &v) const =0
 
virtual ValueType GetValue (const CorpusType &v) const =0
 
virtual CorpusType ParseCorpus (IRObject v) const
 
virtual IRObject SerializeCorpus (const CorpusType &v) const
 
virtual void Mutate (Rng &rng, CorpusType &v, bool only_shrink=false) const =0
 

Detailed Description

template<typename ValueType, typename CorpusType = ValueType>
class zeroerr::Domain< ValueType, CorpusType >

Domain class for generating random values of a specific type.

Template Parameters
ValueTypeThe type of the value to generate.
CorpusTypeThe type of the corpus stored in the domain. Here is an example. If you want to generate an list of intergers, but will store the list in a vector, then ValueType will be std::list<int> and CorpusType will be std::vector<int>.

Constructor & Destructor Documentation

◆ ~Domain()

template<typename ValueType , typename CorpusType = ValueType>
virtual zeroerr::Domain< ValueType, CorpusType >::~Domain ( )
virtualdefault

Member Function Documentation

◆ FromValue()

◆ GetRandomCorpus()

◆ GetRandomValue()

template<typename ValueType , typename CorpusType = ValueType>
virtual ValueType zeroerr::Domain< ValueType, CorpusType >::GetRandomValue ( Rng rng) const
inlinevirtual

◆ GetValue()

template<typename ValueType , typename CorpusType = ValueType>
virtual ValueType zeroerr::Domain< ValueType, CorpusType >::GetValue ( const CorpusType &  v) const
pure virtual

Implemented in zeroerr::ElementOf< T >.

◆ Mutate()

template<typename ValueType , typename CorpusType = ValueType>
virtual void zeroerr::Domain< ValueType, CorpusType >::Mutate ( Rng rng,
CorpusType &  v,
bool  only_shrink = false 
) const
pure virtual

Implemented in zeroerr::ElementOf< T >.

◆ ParseCorpus()

template<typename ValueType , typename CorpusType = ValueType>
virtual CorpusType zeroerr::Domain< ValueType, CorpusType >::ParseCorpus ( IRObject  v) const
inlinevirtual

◆ SerializeCorpus()

template<typename ValueType , typename CorpusType = ValueType>
virtual IRObject zeroerr::Domain< ValueType, CorpusType >::SerializeCorpus ( const CorpusType &  v) const
inlinevirtual

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