public final class GrtNumericFuzzer extends GrtFuzzer
char. Samples a Gaussian delta g ~
N(0,sigma^2) (sigma configurable via GenInputsAbstract.grt_fuzzing_stddev), and adds
it to the original.| Modifier and Type | Field and Description |
|---|---|
private static GrtNumericFuzzer |
INSTANCE
Singleton instance.
|
NEGATIVE_INDEX_CACHE| Modifier | Constructor and Description |
|---|---|
private |
GrtNumericFuzzer()
Private constructor to enforce singleton.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canFuzz(Type type)
Returns
true if this fuzzer can handle the type. |
Sequence |
fuzz(Sequence sequence)
Appends fuzzing statements to
sequence. |
static GrtNumericFuzzer |
getInstance()
Obtain the singleton instance of
GrtNumericFuzzer. |
private static java.lang.Object |
sampleMutatedValue(Type type,
java.lang.Number orig)
Sample g ~ N(0,sigma^2), add to orig.doubleValue(), and cast to the right type.
|
getFuzzer, getRelativeNegativeIndicesprivate static final GrtNumericFuzzer INSTANCE
private GrtNumericFuzzer()
public static GrtNumericFuzzer getInstance()
GrtNumericFuzzer.public boolean canFuzz(Type type)
GrtFuzzertrue if this fuzzer can handle the type.public Sequence fuzz(Sequence sequence)
GrtFuzzersequence. If the type is unsupported by this fuzzer, the
implementation throws an exception.private static java.lang.Object sampleMutatedValue(Type type, java.lang.Number orig)
type - the type of the value to fuzzorig - the original value