Lines Matching refs:lhs
115 def __init__(self, operator: str, lhs: Union[int, float, Expression],
118 self.lhs = _Constify(lhs)
162 lhs = self.lhs.Simplify()
164 if isinstance(lhs, Constant) and isinstance(rhs, Constant):
165 return Constant(ast.literal_eval(lhs + self.operator + rhs))
167 if isinstance(self.lhs, Constant):
168 if self.operator in ('+', '|') and lhs.value == '0':
173 if self.operator == '*' and lhs.value == '0' and (
177 if self.operator == '*' and lhs.value == '1':
182 return lhs
188 return lhs
190 return Operator(self.operator, lhs, rhs)
194 return self.operator == other.operator and self.lhs.Equals(
195 other.lhs) and self.rhs.Equals(other.rhs)
201 lhs = self.lhs.Substitute(name, expression)
205 return Operator(self.operator, lhs, rhs)
260 lhs: Union[int, float, Expression],
263 self.lhs = _Constify(lhs)
277 lhs = self.lhs.Simplify()
279 if isinstance(lhs, Constant) and isinstance(rhs, Constant):
286 return Function(self.fn, lhs, rhs)
290 result = self.fn == other.fn and self.lhs.Equals(other.lhs)
299 lhs = self.lhs.Substitute(name, expression)
303 return Function(self.fn, lhs, rhs)
384 def min(lhs: Union[int, float, Expression], rhs: Union[int, float,
388 return Function('min', lhs, rhs)
391 def max(lhs: Union[int, float, Expression], rhs: Union[int, float,
395 return Function('max', lhs, rhs)
398 def d_ratio(lhs: Union[int, float, Expression],
402 return Function('d_ratio', lhs, rhs)