ZeroErr
全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 
zeroerr::Domain< ValueType, CorpusType > 模板类 参考abstract

Domain class for generating random values of a specific type. 更多...

#include <domain.h>

类 zeroerr::Domain< ValueType, CorpusType > 继承关系图:

Public 成员函数

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
 

详细描述

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

Domain class for generating random values of a specific type.

模板参数
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>.

构造及析构函数说明

◆ ~Domain()

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

成员函数说明

◆ 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

◆ 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

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

该类的文档由以下文件生成: