|
ZeroErr
|
ElementOf is a domain that generates random values from a fixed set of elements 更多...
#include <element_of.h>


Public 类型 | |
| using | ValueType = T |
| using | CorpusType = uint64_t |
Public 成员函数 | |
| 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 成员函数 继承自 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 属性 | |
| std::vector< T > | elements |
ElementOf is a domain that generates random values from a fixed set of elements
| T | The type of elements to generate |
This domain allows generating random values by selecting from a predefined set of elements. The elements are provided as a vector during construction.
Example:
| using zeroerr::ElementOf< T >::CorpusType = uint64_t |
| using zeroerr::ElementOf< T >::ValueType = T |
|
inline |
|
inlineoverridevirtual |
|
inlineoverride |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
| std::vector<T> zeroerr::ElementOf< T >::elements |