Sha256: 63273674e3107a3eef5556d89dee4755e38b2a53fc7ac0e54da400abbc8daf49
Contents?: true
Size: 460 Bytes
Versions: 1
Compression:
Stored size: 460 Bytes
Contents
module DpllSolver module Formulas class Literal attr_accessor :var, :phase def initialize(var, phase) @var = var @phase = phase end def negate self.class.new(@var, !@phase) end def to_s phase ? @var.to_s : "-#{@var.to_s}" end def ==(other) other.class == self.class && other.var == @var && other.phase == @phase end alias eql? == end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dpll_solver-0.0.1 | lib/dpll_solver/formulas/literal.rb |