Enum TtcDistribution

    • Enum Constant Detail

      • BERNOULLI

        public static final TtcDistribution BERNOULLI
        Enum constant representing a bernoulli distribution.

        Arguments: [probability], where 0 ≤ probability ≤ 1

        Since:
        1.0.0
      • BINOMIAL

        public static final TtcDistribution BINOMIAL
        Enum constant representing a binomial distribution.

        Arguments: [numberOfTrials, probabilityOfSuccess], where 0 ≤ numberOfTrials, numberOfTrials ∈ ℤ, 0 ≤ probabilityOfSuccess ≤ 1

        Since:
        1.0.0
      • EXPONENTIAL

        public static final TtcDistribution EXPONENTIAL
        Enum constant representing an exponential distribution.

        Arguments: [rate], where 0 < rate

        Since:
        1.0.0
      • GAMMA

        public static final TtcDistribution GAMMA
        Enum constant representing a gamma distribution.

        Arguments: [shape, scale], where 0 < shape, 0 < scale

        Since:
        1.0.0
      • LOG_NORMAL

        public static final TtcDistribution LOG_NORMAL
        Enum constant representing a log-normal distribution.

        Arguments: [normalMean, normalStandardDeviation], where 0 < normalStandardDeviation

        Since:
        1.0.0
      • PARETO

        public static final TtcDistribution PARETO
        Enum constant representing a pareto distribution.

        Arguments: [minimumValue, shape], where 0 < minimumValue, 0 < shape

        Since:
        1.0.0
      • TRUNCATED_NORMAL

        public static final TtcDistribution TRUNCATED_NORMAL
        Enum constant representing a truncated normal distribution.

        Arguments: [mean, standardDeviation], where 0 < standardDeviation

        Since:
        1.0.0
      • UNIFORM

        public static final TtcDistribution UNIFORM
        Enum constant representing a uniform distribution.

        Arguments: [minimum, maximum], where minimummaximum

        Since:
        1.0.0
      • EASY_AND_CERTAIN

        public static final TtcDistribution EASY_AND_CERTAIN
        Enum constant representing the TTC distribution EasyAndCertain.

        Defined as Exponential(1.0)

        Since:
        1.0.0
      • EASY_AND_UNCERTAIN

        public static final TtcDistribution EASY_AND_UNCERTAIN
        Enum constant representing the TTC distribution EasyAndUncertain.

        Defined as Bernoulli(0.5) + Exponential(1.0)

        Since:
        1.0.0
      • HARD_AND_CERTAIN

        public static final TtcDistribution HARD_AND_CERTAIN
        Enum constant representing the TTC distribution HardAndCertain.

        Defined as Exponential(0.1)

        Since:
        1.0.0
      • HARD_AND_UNCERTAIN

        public static final TtcDistribution HARD_AND_UNCERTAIN
        Enum constant representing the TTC distribution HardAndUncertain.

        Defined as Bernoulli(0.5) + Exponential(0.1)

        Since:
        1.0.0
      • VERY_HARD_AND_CERTAIN

        public static final TtcDistribution VERY_HARD_AND_CERTAIN
        Enum constant representing the TTC distribution VeryHardAndCertain.

        Defined as Exponential(0.01)

        Since:
        1.0.0
      • VERY_HARD_AND_UNCERTAIN

        public static final TtcDistribution VERY_HARD_AND_UNCERTAIN
        Enum constant representing the TTC distribution VeryHardAndUncertain.

        Defined as Bernoulli(0.5) + Exponential(0.01)

        Since:
        1.0.0
      • INFINITY

        public static final TtcDistribution INFINITY
        Enum constant representing infinite TTC.
        Since:
        1.0.0
      • ZERO

        public static final TtcDistribution ZERO
        Enum constant representing zero TTC.
        Since:
        1.0.0
      • ENABLED

        public static final TtcDistribution ENABLED
        Enum constant representing enabled defense.
        Since:
        1.0.0
      • DISABLED

        public static final TtcDistribution DISABLED
        Enum constant representing disabled defense.
        Since:
        1.0.0
    • Method Detail

      • values

        public static TtcDistribution[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TtcDistribution c : TtcDistribution.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TtcDistribution valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • validateArguments

        public void validateArguments​(double... arguments)
        Validates arguments against this TtcDistribution.
        Parameters:
        arguments - the arguments of the distribution
        Throws:
        NullPointerException - if arguments is null
        IllegalArgumentException - if arguments is not valid for this TtcDistribution
        Since:
        1.0.0
      • getMeanTtc

        public double getMeanTtc​(double... arguments)
        Returns the mean TTC of this TtcDistribution object given arguments.
        Parameters:
        arguments - the arguments of the distribution
        Returns:
        the mean TTC of this TtcDistribution object given arguments
        Throws:
        UnsupportedOperationException - if this TtcDistribution does not support mean TTC
        NullPointerException - if arguments is null
        IllegalArgumentException - if arguments is not valid for this TtcDistribution
        Since:
        1.0.0
      • getMeanProbability

        public double getMeanProbability​(double... arguments)
        Returns the mean probability of this TtcDistribution object given arguments.
        Parameters:
        arguments - the arguments of the distribution
        Returns:
        the mean probability of this TtcDistribution object given arguments
        Throws:
        UnsupportedOperationException - if this TtcDistribution does not support mean probability
        NullPointerException - if arguments is null
        IllegalArgumentException - if arguments is not valid for this TtcDistribution
        Since:
        1.0.0
      • toString

        public String toString()
        Returns the name of this TtcDistribution object.
        Overrides:
        toString in class Enum<TtcDistribution>
        Returns:
        the name of this TtcDistribution object
        Since:
        1.0.0
      • fromString

        public static TtcDistribution fromString​(String name)
        Returns the distribution with the name name.
        Parameters:
        name - the name of the distribution
        Returns:
        the distribution with the name name
        Throws:
        NullPointerException - if name is null
        IllegalArgumentException - if name is not the name of a distribution
        Since:
        1.0.0