sasoptpy.Expression._is_linear¶
-
Expression.
_is_linear
(self)[source]¶ Checks whether the expression is composed of linear components
- Returns
- is_linearboolean
True if the expression is linear, False otherwise
Examples
>>> x = so.Variable() >>> e = x*x >>> print(e.is_linear()) False
>>> f = x*x + x*x - 2*x*x + 5 >>> print(f.is_linear()) True