QPair
- java.lang.Object
-
- com.dashoptimization.maps.MapKey2<K1,K2>
-
- com.dashoptimization.maps.ComparableMapKey2<Variable,Variable>
-
- com.dashoptimization.objects.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 canonicaly ordering, so(v1,v2)
and(v2,v1)
will map to the same representation. Instances can represent linear terms as well. In that casevar2
is invalid andisLinear()
returnstrue
. Instances can also represent constant terms. In that casevar1
andvar2
are both invalid andisConstant()
returnstrue
.- Since:
- 43.00
-
-
Method Summary
Modifier and Type Method Description Variable
getVar1()
Variable
getVar2()
boolean
isConstant()
Test whether this pair represents a constant term.boolean
isLinear()
Test whether this pair represents a linear term.-
Methods inherited from class com.dashoptimization.maps.ComparableMapKey2
compareTo
-
-
-
-
Method Detail
-
getVar1
public Variable getVar1()
-
getVar2
public Variable getVar2()
-
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
-
-
© 2001-2024 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.