Lines Matching refs:rhs

116                rhs: Union[int, float, Expression]):
119 self.rhs = _Constify(rhs)
124 rhs: bool = False) -> str:
148 if rhs and _PRECEDENCE.get(self.operator, -1) == _PRECEDENCE.get(
163 rhs = self.rhs.Simplify()
164 if isinstance(lhs, Constant) and isinstance(rhs, Constant):
165 return Constant(ast.literal_eval(lhs + self.operator + rhs))
169 return rhs
174 not isinstance(rhs, Event) or 'slots' not in rhs.name.lower()):
178 return rhs
180 if isinstance(rhs, Constant):
181 if self.operator in ('+', '|') and rhs.value == '0':
184 if self.operator == '*' and rhs.value == '0':
187 if self.operator == '*' and self.rhs.value == '1':
190 return Operator(self.operator, lhs, rhs)
195 other.lhs) and self.rhs.Equals(other.rhs)
202 rhs = None
203 if self.rhs:
204 rhs = self.rhs.Substitute(name, expression)
205 return Operator(self.operator, lhs, rhs)
261 rhs: Optional[Union[int, float, Expression]] = None):
264 self.rhs = _Constify(rhs)
267 if self.rhs:
272 if self.rhs:
278 rhs = self.rhs.Simplify() if self.rhs else None
279 if isinstance(lhs, Constant) and isinstance(rhs, Constant):
281 if rhs.value == '0':
286 return Function(self.fn, lhs, rhs)
291 if self.rhs:
292 result = result and self.rhs.Equals(other.rhs)
300 rhs = None
301 if self.rhs:
302 rhs = self.rhs.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)
399 rhs: Union[int, float, Expression]) -> Function:
402 return Function('d_ratio', lhs, rhs)