Initializing help system before first use

QuadTermMap Class

A quadratic expression. This class implements a quadratic expression as a map from variables to values.
Inheritance Hierarchy
System.Object
   Optimizer.Objects.Expression
     Optimizer.Objects.AbstractExpression
       Optimizer.Objects.QuadExpression
         Optimizer.Objects.QuadTermMap

Namespace:   Optimizer.Objects
Assembly:  xprsdn (in xprsdn.dll) Version: 44.01.04
Syntax
C#
public sealed class QuadTermMap : QuadExpression

The QuadTermMap type exposes the following members.

Constructors
  Name Description
Public method QuadTermMap()
Create a new empty expression.
Public method QuadTermMap(Double)
Create an expression with a constant term.
Top
Methods
  Name Description
Public method AddConstant
Add a value to the constant term of this expression.
(Overrides QuadExpression.AddConstant(Double).)
Public method AddTerm(LinTerm)
Add term to this expression.
(Inherited from QuadExpression.)
Public method AddTerm(QuadTerm)
Add term to this expression.
(Inherited from QuadExpression.)
Public method AddTerm(Variable)
Add term 1.0*x to this expression. If the expression already has a coefficient for x then the old and the new coefficients will be added.
(Overrides QuadExpression.AddTerm(Variable).)
Public method AddTerm(Double, Variable)
Add a term to this expression. If the expression already has a coefficient for variable then the old and the new coefficients will be added.
(Overrides QuadExpression.AddTerm(Double, Variable).)
Public method AddTerm(Variable, Variable)
Add term 1.0*x1*x2 to this expression. If the expression already has a coefficient for x then the old and the new coefficients will be added.
(Overrides QuadExpression.AddTerm(Variable, Variable).)
Public method AddTerm(Variable, Double)
Add a term to this expression. If the expression already has a coefficient for variable then the old and the new coefficients will be added.
(Overrides QuadExpression.AddTerm(Variable, Double).)
Public method AddTerm(Double, Variable, Variable)
Add a term to this expression. If the expression already has a coefficient for variable1*variable2 then the old and the new coefficients will be added.
(Overrides QuadExpression.AddTerm(Double, Variable, Variable).)
Public method AddTerm(Variable, Variable, Double)
Add a term to this expression. If the expression already has a coefficient for variable1*variable2 then the old and the new coefficients will be added.
(Overrides QuadExpression.AddTerm(Variable, Variable, Double).)
Public method AddTerms(LinExpression)
Add another linear expression to this expression.
(Overrides QuadExpression.AddTerms(LinExpression).)
Public method AddTerms(QuadExpression)
Add another quadratic expression to this expression.
(Overrides QuadExpression.AddTerms(QuadExpression).)
Public method AddTerms(LinExpression, Double)
Add another linear expression to this expression.
(Overrides QuadExpression.AddTerms(LinExpression, Double).)
Public method AddTerms(QuadExpression, Double)
Add another quadratic expression to this expression.
(Overrides QuadExpression.AddTerms(QuadExpression, Double).)
Public method AddTerms(IEnumerable<Variable>, IEnumerable<Double>)
Add multiple linear terms to this expression. Adds the scalar product defined by the element-wise multiplication of variables and coefficients.
(Inherited from QuadExpression.)
Public method AddTerms(IEnumerable<Variable>, IEnumerable<Variable>, IEnumerable<Double>)
Add multiple quadratic terms to this expression. Adds the scalar product defined by the element-wise multiplication of variables1, variables2 and coefficients.
(Inherited from QuadExpression.)
Public method AddTerms(Variable, Double, Int32, Int32)
Add multiple terms to this expression. Adds the scalar product defined by the element-wise multiplication of variables and coefficients using count elements starting from offset.
(Inherited from QuadExpression.)
Public method AddTerms(Variable, Variable, Double, Int32, Int32)
Add multiple terms to this expression. Adds the scalar product defined by the element-wise multiplication of variables1, variables2 and coefficients using count elements starting from offset.
(Inherited from QuadExpression.)
Public method DeepCopy()
Get a deep copy of this expression.
(Overrides QuadExpression.DeepCopy().)
Public method DeepCopy(Double)
Get a deep copy of this expression multiplied by a constant
(Overrides QuadExpression.DeepCopy(Double).)
Public method Div(Double)
Create a new expression that represents the quotient of this and arg.
(Inherited from Expression.)
Public method Div(Expression)
Create a new expression that represents the quotient of this and arg.
(Inherited from Expression.)
Public method Eq(Double)
Create an "equals" constraint with this expression as left-hand side.
(Inherited from AbstractExpression.)
Public method Eq(Expression)
Create an "equals" constraint with this expression as left-hand side.
(Inherited from AbstractExpression.)
Public method Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public method Evaluate
Compute the value of this expression with respect to the given solution Vector (which is not required to be feasible).
(Overrides Expression.Evaluate(Double).)
Public method Extract(Double, IPostfixExtractor)
Extract this expression into postfix notation.
(Overrides Expression.Extract(Double, IPostfixExtractor).)
Public method Extract(Double, XPRSprob.RowCreator)
Extract this expression into a row. This is for internal use only, you should never have to call this function explicitly.
(Overrides Expression.Extract(Double, XPRSprob.RowCreator).)
Public method Geq(Double)
Create a "greater than or equal" constraint with this expression as left-hand side.
(Inherited from AbstractExpression.)
Public method Geq(Expression)
Create a "greater than or equal" constraint with this expression as left-hand side.
(Inherited from AbstractExpression.)
Public method GetCoefficient(Variable)
Get the coefficient for a variable.
Public method GetCoefficient(Variable, Variable)
Get the coefficient for a variable product.
Public method GetConstant
Get the constant value in this expression.
(Overrides QuadExpression.GetConstant().)
Public method GetConstantView
Get the constant value to which this expression evaluates. If this expression can be treated as a constant value then the function returns the constant value. If the expression cannot be treated as a constant then an exception is raised. In order to test whether the expression can be treated as constant, use function .GetMaxDegree() and check whether it returns 0.
(Inherited from AbstractExpression.)
Public method GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public method GetLinearView
Get a linear read-only view on this expression. If this expression can be treated as a linear expression then the function returns a readonly view on the linear terms (including the constant term if there is any). If the expression cannot be treated as a linear expression then an exception is raised. In order to test this expression can be treated as linear, use function .GetMaxDegree() and check whether it returns 0 or 1. In the returned System.Collections.Generic.KeyValuePair instances the constant term is indicated with a key of Optimizer.Objects.XpressProblem.NULL_VARIABLE. Note that depending on the actual expression class and its implementation, the terms may not be presented in the same order in which you added them. There may also be multiple elements with the same key (again depending on the implementation of the actual object).
(Inherited from AbstractExpression.)
Public method GetMaxDegree
Get the maximum degree of any of the terms/monomials that appear in the symbolic representation of all parenthesized sub-expressions are fully expanded. The maximum degree is
  • 0 for constant expressions.
  • 1 for linear expressions.
  • 2 for quadratic expressions.
  • Int32.MaxValue for function calls or formulas.
(Inherited from QuadExpression.)
Public method GetQuadView
Get a quadratic read-only view on this expression. If this expression can be treated as a quadratic expression then the function returns a readonly view on the quadratic terms (including the constant term and linear terms if there are any). If the expression cannot be treated as a linear expression then an exception is raised. In order to test this expression can be treated as quadratic, use function .GetMaxDegree() and check whether it returns 0, 1, or 2. In the returned System.Collections.Generic.KeyValuePair instances the constant term is indicated with a key with two Optimizer.Objects.XpressProblem.NULL_VARIABLEs. Linear terms are represented by a QPair with Optimizer.Objects.XpressProblem.NULL_VARIABLE as second variable. Note that depending on the actual expression class and its implementation, the terms may not be presented in the same order in which you added them. There may also be multiple elements with the same key (again depending on the implementation of the actual object).
(Overrides AbstractExpression.GetQuadView().)
Public method GetRTTI
Get runtime type identification.
(Inherited from QuadExpression.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method In
Create a range constraint that bounds this expression from below and above.
(Inherited from AbstractExpression.)
Public method Leq(Double)
Create a "less than or equal" constraint with this expression as left-hand side.
(Inherited from AbstractExpression.)
Public method Leq(Expression)
Create a "less than or equal" constraint with this expression as left-hand side.
(Inherited from AbstractExpression.)
Public method Minus(Double)
Create a new expression that represents the difference of this and arg.
(Inherited from Expression.)
Public method Minus(Expression)
Create a new expression that represents the difference of this and arg.
(Inherited from Expression.)
Public method Mul(Double)
Create a new expression that represents the product of this and arg.
(Inherited from Expression.)
Public method Mul(Expression)
Create a new expression that represents the product of this and arg.
(Inherited from Expression.)
Public method Plus(Double)
Create a new expression that represents the sum of this and arg.
(Inherited from Expression.)
Public method Plus(Expression)
Create a new expression that represents the sum of this and arg.
(Inherited from Expression.)
Public method Reset
Clear this expression. Removes all terms and sets the constant to 0.
(Overrides QuadExpression.Reset().)
Public method SetCoefficient(Variable, Double)
Set the coefficient for a variable in this expression. Any existing coefficient will be overwritten.
Public method SetCoefficient(Variable, Variable, Double)
Set the coefficient for a variable product in this expression. Any existing coefficient will be overwritten.
Public method SetConstant
Set the constant term in this expression. Any existing constant term will be overwritten.
(Overrides QuadExpression.SetConstant(Double).)
Public method ToString
Returns a String that represents the current Object.
(Overrides Object.ToString().)
Public method Uminus
Create a new expression that represents the unary minus of this one.
(Inherited from Expression.)
Top
See Also

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