Initializing help system before first use

QPair

  • All Implemented Interfaces:
    java.lang.Comparable<ComparableMapKey2<Variable,​Variable>>

    public final class QPair
    extends ComparableMapKey2<Variable,​Variable>
    Pair of variables in a quadratic expression. Instances of this class are used to represent pairs of variables in quadratic expressions. Variables in this instance are always ordered according to a canonical ordering, so (v1,v2) and (v2,v1) will map to the same representation. Instances can represent linear terms as well. In that case var2 is invalid and isLinear() returns true. Instances can also represent constant terms. In that case var1 and var2 are both invalid and isConstant() returns true.
    Since:
    43.00
    • Constructor Detail

      • QPair

        public QPair​(Variable v1,
                     Variable v2)
        Create a new pair of variables. The variables passed to this constructor will be ordered canonically, i.e., a pair (v1,v2) may be stored as (v2,v1) if v2 comes before v1 in the ordering of variables.
        Parameters:
        v1 - First variable.
        v2 - Second variable.
        Since:
        43.00
      • QPair

        public QPair​(QPair q)
        Copy an instance.
        Parameters:
        q - The instance to copy.
        Since:
        44.00
    • Method Detail

      • getVar1

        public Variable getVar1()
        First variable in this pair.
        Since:
        43.00
      • getVar2

        public Variable getVar2()
        Second variable in this pair.
        Since:
        43.00
      • isLinear

        public boolean isLinear()
        Test whether this pair represents a linear term.
        Returns:
        true if this instance represents a linear term, false otherwise.
        Since:
        43.00
      • isConstant

        public boolean isConstant()
        Test whether this pair represents a constant term.
        Returns:
        true if this instance represents a constant term, false otherwise.
        Since:
        43.00
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class  java.lang.Object
        Since:
        44.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.