Class TtcFunction


  • public final class TtcFunction
    extends TtcExpression
    Immutable class representing a TTC function in a MAL language.
    Since:
    1.0.0
    • Constructor Detail

      • TtcFunction

        public TtcFunction​(TtcDistribution distribution,
                           double... arguments)
        Constructs a new TtcFunction object.
        Parameters:
        distribution - the distribution of the function
        arguments - the arguments of the function
        Throws:
        NullPointerException - if distribution or arguments is null
        IllegalArgumentException - if arguments is not valid for distribution
        Since:
        1.0.0
    • Method Detail

      • getDistribution

        public TtcDistribution getDistribution()
        Returns the distribution of this TtcFunction object.
        Returns:
        the distribution of this TtcFunction object
        Since:
        1.0.0
      • getArguments

        public double[] getArguments()
        Returns the arguments of this TtcFunction object.
        Returns:
        the arguments of this TtcFunction object
        Since:
        1.0.0
      • getMeanTtc

        public double getMeanTtc()
        Description copied from class: TtcExpression
        Returns the mean TTC of this TtcExpression object.
        Overrides:
        getMeanTtc in class TtcExpression
        Returns:
        the mean TTC of this TtcExpression object
      • getMeanProbability

        public double getMeanProbability()
        Description copied from class: TtcExpression
        Returns the mean probability of this TtcExpression object.
        Overrides:
        getMeanProbability in class TtcExpression
        Returns:
        the mean probability of this TtcExpression object
      • toJson

        public JsonObject toJson()
        Description copied from class: TtcExpression
        Returns the JSON representation of this TtcExpression object.
        Specified by:
        toJson in class TtcExpression
        Returns:
        the JSON representation of this TtcExpression object