Documentation


LinExpr.getCoeff()

getCoeff ( i )

Retrieve the coefficient from a single term of the expression.

Return value:

Coefficient for the term at index i in the expression.

Example usage:

  e = x + 2 * y + 3
  print(e.getCoeff(1))