Initializing help system before first use

LinTerm

    • Constructor Summary

      Constructor Description
      LinTerm​(Variable variable, double coefficient)
      Create a new term.
    • Method Summary

      Modifier and Type Method Description
      LinTerm div​(double arg)
      Create a new expression that represents the quotient of this and arg.
      LinTerm div​(ConstantExpression arg)
      Create a new expression that represents the quotient of this and arg.
      Expression div​(Expression arg)
      Create a new expression that represents the quotient of this and arg.
      double evaluate​(double[] solution)
      Compute the value of this expression with respect to the given solution vector (which is not required to be feasible).
      double getCoefficient()  
      Variable getVariable()  
      static LinTerm lTerm​(Variable variable)
      Convenience function to create a single linear term.
      static LinTerm lTerm​(Variable variable, double coefficient)
      Convenience function to create a single linear term.
      LinTerm mul​(double arg)
      Create a new expression that represents the product of this and arg.
      LinTerm mul​(ConstantExpression arg)
      Create a new expression that represents the product of this and arg.
      Expression mul​(Expression arg)
      Create a new expression that represents the product of this and arg.
      QuadTerm mul​(LinTerm arg)
      Create a new expression that represents the product of this and arg.
      QuadTerm mul​(Variable arg)
      Create a new expression that represents the product of this and arg.
      QuadTerm square()
      Multiply this term by itself.
      java.lang.String toString()
      static java.lang.String toString​(Variable v, double coef)
      Convert a linear term to a string.
      LinTerm uminus()
      Create a new expression that represents the unary minus of this one.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LinTerm

        public LinTerm​(Variable variable,
                       double coefficient)
        Create a new term.
        Parameters:
        variable - objects.Variable in the term.
        coefficient - Coefficient for variable.
        Since:
        43.00
    • Method Detail

      • getVariable

        public Variable getVariable()
      • getCoefficient

        public double getCoefficient()
      • evaluate

        public double evaluate​(double[] solution)
        Compute the value of this expression with respect to the given solution vector (which is not required to be feasible).
        Specified by:
        evaluate in class  Expression
        Parameters:
        solution - Solution values for which the expression is evaluated.
        Returns:
        The value of this expression evaluated at solution.
        Since:
        43.00
      • lTerm

        public static LinTerm lTerm​(Variable variable,
                                    double coefficient)
        Convenience function to create a single linear term.
        Parameters:
        variable - objects.Variable for term.
        coefficient - Coefficient for term.
        Returns:
        The newly created term.
        Since:
        43.00
      • lTerm

        public static LinTerm lTerm​(Variable variable)
        Convenience function to create a single linear term. Creates the term 1 * variable.
        Parameters:
        variable - objects.Variable for term.
        Returns:
        The newly created term.
        Since:
        43.00
      • square

        public QuadTerm square()
        Multiply this term by itself.
        Returns:
        The product of this term with itself.
        Since:
        43.00
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class  java.lang.Object
        Returns:
        Since:
        43.00
      • toString

        public static java.lang.String toString​(Variable v,
                                                double coef)
        Convert a linear term to a string. Note that while the LinTerm class does not allow XpressProblem.NULL_VARIABLE as variable, this function allows this variable to indicate constantterms.

        Used in these examples:

        • GlobalRHSParametrics
        • IISExample
        • Knapsack
        • Trimloss
        Parameters:
        v - Variable in linear term.
        coef - Coeffcient in linear term.
        Returns:
        String representation of coef*v.
        Since:
        43.00
      • uminus

        public LinTerm uminus()
        Create a new expression that represents the unary minus of this one.
        Overrides:
        uminus in class  Expression
        Returns:
        Expression representing -this.
        Since:
        43.00
      • mul

        public Expression mul​(Expression arg)
        Create a new expression that represents the product of this and arg.
        Overrides:
        mul in class  Expression
        Parameters:
        arg - Factor.
        Returns:
        Product of this and arg.
        Since:
        43.00
      • mul

        public LinTerm mul​(ConstantExpression arg)
        Create a new expression that represents the product of this and arg.
        Parameters:
        arg - Factor.
        Returns:
        The new expression.
        Since:
        43.00
      • mul

        public LinTerm mul​(double arg)
        Create a new expression that represents the product of this and arg.
        Overrides:
        mul in class  Expression
        Parameters:
        arg - Factor.
        Returns:
        Product of this and arg.
        Since:
        43.00
      • mul

        public QuadTerm mul​(Variable arg)
        Create a new expression that represents the product of this and arg.
        Parameters:
        arg - Factor.
        Returns:
        The new expression.
        Since:
        43.00
      • mul

        public QuadTerm mul​(LinTerm arg)
        Create a new expression that represents the product of this and arg.
        Parameters:
        arg - Factor.
        Returns:
        The new expression.
        Since:
        43.00
      • div

        public Expression div​(Expression arg)
        Create a new expression that represents the quotient of this and arg.
        Overrides:
        div in class  Expression
        Parameters:
        arg - Divisor.
        Returns:
        Quotient of this and arg.
        Since:
        43.00
      • div

        public LinTerm div​(ConstantExpression arg)
        Create a new expression that represents the quotient of this and arg.
        Parameters:
        arg - Divisor.
        Returns:
        The new expression.
        Since:
        43.00
      • div

        public LinTerm div​(double arg)
        Create a new expression that represents the quotient of this and arg.
        Overrides:
        div in class  Expression
        Parameters:
        arg - Divisor.
        Returns:
        Quotient of this and arg.
        Since:
        43.00

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.