Initializing help system before first use

# QPair

Pair of variables in a quadratic expression. More...

Inheritance diagram for xpress::objects::QPair:

## Public Member Functions
| QPair (QPair const &q)
| Copy an instance.
| QPair (xpress::objects::Variable v1, xpress::objects::Variable v2)
| Create a pair of variables.
auto | getVar1 () const -> xpress::objects::Variable
| First variable in this pair.
auto | getVar2 () const -> xpress::objects::Variable
| Second variable in this pair.
auto | isConstant () const -> bool
| Test whether this pair represents a constant term.
auto | isLinear () const -> bool
| Test whether this pair represents a linear term.
auto | toString () const -> std::string
Public Member Functions inherited from xpress::maps::ComparableMapKey2< xpress::objects::Variable, xpress::objects::Variable >
| ComparableMapKey2 (xpress::objects::Variable const &key1, xpress::objects::Variable const &key2)
| Create a new 2-dimensional key from the given keys.
Public Member Functions inherited from xpress::maps::MapKey2< xpress::objects::Variable, xpress::objects::Variable >
| MapKey2 (xpress::objects::Variable const &key1, xpress::objects::Variable const &key2)
| Create a new 2-dimensional key from the given keys.
xpress::objects::Variable & | getKey1 ()
| Get key number 1.
xpress::objects::Variable & | getKey2 ()
| Get key number 2.

## Detailed Description

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
  44.00

## Constructor & Destructor Documentation

## QPair() [1/2]

xpress::objects::QPair::QPair | ( | xpress::objects::Variable | v1,
|  | xpress::objects::Variable | v2 )
| inline

Create a 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
  44.00

## QPair() [2/2]

xpress::objects::QPair::QPair | ( | QPair const & | q | ) |
| inline

Copy an instance.

Parameters

  q | The instance to copy.

Since
  44.00

## Member Function Documentation

## getVar1()

auto xpress::objects::QPair::getVar1 | ( |  | ) | const -> xpress::objects::Variable
| inline

First variable in this pair.

Since
  44.00

## getVar2()

auto xpress::objects::QPair::getVar2 | ( |  | ) | const -> xpress::objects::Variable
| inline

Second variable in this pair.

Since
  44.00

## isConstant()

auto xpress::objects::QPair::isConstant | ( |  | ) | const -> bool
| inline

Test whether this pair represents a constant term.

Returns
  `true` if this instance represents a constant term, `false` otherwise.

Since
  44.00

## isLinear()

auto xpress::objects::QPair::isLinear | ( |  | ) | const -> bool
| inline

Test whether this pair represents a linear term.

Returns
  `true` if this instance represents a linear term, `false` otherwise.

Since
  44.00

## toString()

auto xpress::objects::QPair::toString | ( |  | ) | const -> std::string
| inline

Since
  44.00

The documentation for this class was generated from the following file:

- xpress_objects.hpp

Parent Topic objects

© 2001-2026 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.