class Gecode::Constraint
Base class for all constraints.
Public Instance Methods
post()
click to toggle source
Posts the constraint, adding it to the model. This is an abstract method and should be overridden by all sub-classes.
# File doc/tmp/rdoc_dev/gecoder/interface/constraints.rb, line 223 def post raise NotImplementedError, 'Abstract method has not been implemented.' end
Public Class Methods
new(model, params)
click to toggle source
Creates a constraint with the specified parameters, bound to the specified model.
# File doc/tmp/rdoc_dev/gecoder/interface/constraints.rb, line 216 def initialize(model, params) @model = model @params = params.clone end