class Amor::Block
Attributes
constraints[R]
Public Class Methods
new()
click to toggle source
# File lib/amor/block.rb, line 5 def initialize @constraints = Array.new end
Public Instance Methods
add_constraint(constraint)
click to toggle source
# File lib/amor/block.rb, line 9 def add_constraint constraint @constraints << constraint end
dec_string(index)
click to toggle source
Returns a representation for .dec file format of this block It assumes the block has the specified index
# File lib/amor/block.rb, line 15 def dec_string index result = ["BLOCK #{index}"] @constraints.each do | constraint | result << constraint.lp_name end result.join("\n") end