Class: Gecode::Constraints::Bool::ExpressionNode
- Inherits:
-
Object
- Object
- Gecode::Constraints::Bool::ExpressionNode
- Includes:
- OperationMethods
- Defined in:
- lib/gecoder/interface/constraints/bool/boolean.rb
Overview
Describes a single node in a boolean expression.
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
-
#initialize(value, model = nil) ⇒ ExpressionNode
constructor
A new instance of ExpressionNode.
-
#to_minimodel_bool_expr ⇒ Object
Returns a MiniModel boolean expression representing the tree.
Methods included from LeftHandSideMethods
Constructor Details
#initialize(value, model = nil) ⇒ ExpressionNode
Returns a new instance of ExpressionNode.
244 245 246 247 248 249 250 251 |
# File 'lib/gecoder/interface/constraints/bool/boolean.rb', line 244 def initialize(value, model = nil) unless value.kind_of?(Gecode::FreeBoolVar) raise TypeError, 'Invalid type used in boolean equation: ' + "#{value.class}." end @value = value @model = model end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
242 243 244 |
# File 'lib/gecoder/interface/constraints/bool/boolean.rb', line 242 def model @model end |