class CAS::Equal
This class is a Condition
for two equal function
Public Instance Methods
==(op)
click to toggle source
Return true if two functions are equal, false if different
* **argument**: `CAS::Op` operator to check against for equality * **returns**: `TrueClass` or `FalseClass`
# File lib/functions/fnc-conditions.rb, line 199 def ==(op) CAS::Help.assert(op, CAS::Op) cond_f = ((@x == op.x) and (@y == op.y)) or ((@x == op.y) and (@y == op.x)) return (cond_f and (self.class == op.class)) end
call(fd)
click to toggle source
Function
call will evaluate left and right functions to solve the relation
* **argument**: `Hash` with feed dictionary * **returns**: `Trueclass` or `Falseclass`
# File lib/functions/fnc-conditions.rb, line 189 def call(fd) CAS::Help.assert fd, Hash return (@x.call(fd) == @y.call(fd)) end
representative()
click to toggle source
Saves some required elements
# File lib/functions/fnc-conditions.rb, line 179 def representative @cond_type, @cond_repr = "==", "≡" self end