SCIPexprGetQuadraticData

Function SCIPexprGetQuadraticData 

Source
pub unsafe extern "C" fn SCIPexprGetQuadraticData(
    expr: *mut SCIP_EXPR,
    constant: *mut f64,
    nlinexprs: *mut c_int,
    linexprs: *mut *mut *mut SCIP_EXPR,
    lincoefs: *mut *mut f64,
    nquadexprs: *mut c_int,
    nbilinexprs: *mut c_int,
    eigenvalues: *mut *mut f64,
    eigenvectors: *mut *mut f64,
)
Expand description

gives the coefficients and expressions that define a quadratic expression

It can return the constant part, the number, arguments, and coefficients of the purely linear part and the number of quadratic terms and bilinear terms. Note that for arguments that appear in the quadratic part, a linear coefficient is stored with the quadratic term. Use SCIPexprGetQuadraticQuadTerm() and SCIPexprGetQuadraticBilinTerm() to access the data for a quadratic or bilinear term.

It can also return the eigenvalues and the eigenvectors of the matrix \f$Q\f$ when the quadratic is written as \f$x^T Q x + b^T x + c^T y + d\f$, where \f$c^T y\f$ defines the purely linear part. Note, however, that to have access to them one needs to call SCIPcomputeExprQuadraticCurvature() with storeeigeninfo=TRUE. If the eigen information was not stored or it failed to be computed, eigenvalues and eigenvectors will be set to NULL.

This function returns pointers to internal data in linexprs and lincoefs. The user must not change this data.

@attention SCIPcheckExprQuadratic() needs to be called first to check whether expression is quadratic and initialize the data of the quadratic representation.