Class: MagicLogic::NEG

Inherits:
Struct
  • Object
show all
Includes:
Base
Defined in:
lib/magic_logic.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

#dpll!, #include?, #is_and?, #is_form?, #is_neg?, #is_or?, #neg?

Methods included from Operator

#*, #+, #<=>, #>=, #~@

Instance Attribute Details

#pObject

Returns the value of attribute p

Returns:

  • (Object)

    the current value of p



107
108
109
# File 'lib/magic_logic.rb', line 107

def p
  @p
end

Instance Method Details

#!@Object



110
# File 'lib/magic_logic.rb', line 110

def !@;             ~(!p)       end

#depthObject



111
# File 'lib/magic_logic.rb', line 111

def depth;          p.depth+1   end

#to_sObject



109
# File 'lib/magic_logic.rb', line 109

def to_s;          "~#{p}"      end