Class ZestGuidance.Input<K>

    • Constructor Detail

      • Input

        public Input()
        Create an empty input.
      • Input

        public Input​(ZestGuidance.Input toClone)
        Create a copy of an existing input.
        Parameters:
        toClone - the input map to clone
    • Method Detail

      • getOrGenerateFresh

        public abstract int getOrGenerateFresh​(K key,
                                               Random random)
      • size

        public abstract int size()
      • gc

        public abstract void gc()
      • setFavored

        public void setFavored()
        Sets this input to be favored for fuzzing.
      • isFavored

        public boolean isFavored()
        Returns whether this input should be favored for fuzzing.

        An input is favored if it is responsible for covering at least one branch.

        Returns:
        whether or not this input is favored
      • sampleGeometric

        public static int sampleGeometric​(Random random,
                                          double mean)
        Sample from a geometric distribution with given mean. Utility method used in implementing mutation operations.
        Parameters:
        random - a pseudo-random number generator
        mean - the mean of the distribution
        Returns:
        a randomly sampled value