Class: CAS::BoxConditionLowerClosed
- Inherits:
-
BoxCondition
- Object
- Condition
- BoxCondition
- CAS::BoxConditionLowerClosed
- Defined in:
- lib/functions/fnc-box-conditions.rb
Overview
Implements the box condition with lower bound closed and upper open
“‘ a ≤ f(x) < b “`
Instance Attribute Summary
Attributes inherited from BoxCondition
Attributes inherited from Condition
Instance Method Summary collapse
-
#call(fd) ⇒ Object
Function call will evaluate box condition to evaluate relation.
-
#representative ⇒ Object
Saves some required elements.
Methods inherited from BoxCondition
#==, #args, #depend?, #diff, #initialize, #inspect, #simplify, #subs, #to_code, #to_s
Methods inherited from Condition
#==, #args, #depend?, #diff, #initialize, #inspect, #simplify, #subs, #to_code, #to_s
Constructor Details
This class inherits a constructor from CAS::BoxCondition
Instance Method Details
#call(fd) ⇒ Object
Function call will evaluate box condition to evaluate relation
* **argument**: `Hash` with feed dictionary
* **returns**: `Trueclass` or `Falseclass`
230 231 232 233 |
# File 'lib/functions/fnc-box-conditions.rb', line 230 def call(fd) x_call = @x.call(fd) return ((@lower.call(fd) <= x_call) and (x_call < @upper)) end |
#representative ⇒ Object
Saves some required elements
218 219 220 221 222 223 |
# File 'lib/functions/fnc-box-conditions.rb', line 218 def representative @lower_cond = "<=" @lower_str = "≤" @upper_cond = @upper_str = "<" self end |