Initializing help system before first use

sqr Method (XPRBexpr)

Square an XPRBexpr.

Namespace:   BCL
Assembly:  xprbdn (in xprbdn.dll) Version: 4.8.14.0
Syntax
C#
VB
public XPRBexpr sqr(
	XPRBexpr q
)

Parameters

q
Type:  BCLXPRBexpr
The XPRBexpr to square.

Return Value

Type:  XPRBexpr
The resultant XPRBexpr expression if successful. This will throw a "Non-quadratic expression" exception if the result is not quadratic.
Examples
XPRBprob prob = new XPRBprob("NewProb"); XPRBvar var = new XPRBvar("Variable"); XPRBvar var2 = new XPRBvar("Variable2"); XPRBexpr exp = new XPRBexpr(4.2*var + var2*var2); XPRBexpr exp2; ... exp.delTerm(var2); exp2 = new XPRBexpr(XPRBexpr.sqr(exp));
See Also