Class AbsoluteValue

  • public class AbsoluteValue
    extends FunctionalTerm
    This class models the absolute value of the inner term.
    Matthias Thimm
    • Constructor Detail

      • AbsoluteValue

        public AbsoluteValue​(Term term)
        Creates a new absolute value term with the given inner term.
        term - a term
    • Method Detail

      • getAbsoluteValues

        public java.util.Set<AbsoluteValue> getAbsoluteValues()
        Description copied from class: Term
        Returns all absolute values of this term.
        getAbsoluteValues in class FunctionalTerm
        all absolute values of this term.
      • replaceTerm

        public Term replaceTerm​(Term toSubstitute,
                                Term substitution)
        Description copied from class: Term
        Replaces each occurrence of "toSubstitute" by "substitution" and return the new term.
        Specified by:
        replaceTerm in class FunctionalTerm
        toSubstitute - the term to be substituted
        substitution - the new term
        this term where "toSubstitute" is replaced by "substitution"
      • simplify

        public Term simplify()
        Description copied from class: Term
        Simplifies this term in an equivalent way:
        - Replaces products that contain a zero by the constant zero
        - Removes a term one from products
        - Removes a term zero from sums
        - Aggregates constants in sums, products, and minimums
        - Evaluates functional terms on constants
        - Simplifies fractions where possible.
        Specified by:
        simplify in class Term
        the simplified term.
      • isContinuous

        public boolean isContinuous​(Variable v)
        Description copied from class: Term
        Checks whether this term is continuous in v.
        Specified by:
        isContinuous in class Term
        v - a variable
        "true" iff this term is continuous in v.
      • value

        public Constant value()
                       throws java.lang.IllegalArgumentException
        Description copied from class: Term
        Computes the actual value of this term if it contains no variables.
        Specified by:
        value in class FunctionalTerm
        the value of this term, either a float or an integer.
        java.lang.IllegalArgumentException - if this term contains at least on variable.
      • getTerms

        public java.util.List<Term> getTerms()
        Specified by:
        getTerms in class Term