Class: Gecode::Constraints::Int::CompositeExpression

Inherits:
CompositeExpression show all
Defined in:
lib/gecoder/interface/constraints/int_var_constraints.rb

Overview

A composite expression which is an int expression with a left hand side resulting from a previous constraint.

Direct Known Subclasses

Set::Cardinality::Expression

Instance Method Summary collapse

Methods inherited from CompositeExpression

#==, #method_missing

Constructor Details

#initialize(model, params, &block) ⇒ CompositeExpression

The block given should take three parameters. The first is the variable that should be the left hand side, if it’s nil then a new one should be created. The second is the has of parameters. The block should return the variable used as left hand side.



28
29
30
31
# File 'lib/gecoder/interface/constraints/int_var_constraints.rb', line 28

def initialize(model, params, &block)
  super(Expression, Gecode::FreeIntVar, lambda{ model.int_var }, model, 
    params, &block)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Gecode::Constraints::CompositeExpression