Class: Gecode::FreeVarBase
- Inherits:
-
Object
- Object
- Gecode::FreeVarBase
- Defined in:
- lib/gecoder/interface/variables.rb
Overview
Describes a variable that is bound to a model, but not to a particular space.
Instance Attribute Summary collapse
-
#model ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#initialize(model, index) ⇒ FreeVarBase
constructor
Creates an int variable with the specified index.
- #inspect ⇒ Object
Constructor Details
#initialize(model, index) ⇒ FreeVarBase
Creates an int variable with the specified index.
8 9 10 11 12 |
# File 'lib/gecoder/interface/variables.rb', line 8 def initialize(model, index) @model = model @index = index model.track_variable(self) end |
Instance Attribute Details
#model ⇒ Object
:nodoc:
5 6 7 |
# File 'lib/gecoder/interface/variables.rb', line 5 def model @model end |
Instance Method Details
#inspect ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/gecoder/interface/variables.rb', line 14 def inspect if assigned? "#<#{self.class} #{domain_string}>" else "#<#{self.class} #{domain_string}>" end end |