Class: Ravensat::NotNode

Inherits:
OprNode show all
Defined in:
lib/ravensat/ast/not_node.rb

Instance Attribute Summary

Attributes inherited from Node

#children

Instance Method Summary collapse

Methods inherited from OprNode

#initialize

Methods inherited from Node

#&, #clauses_size, #cnf?, #each, #each_by_descriptive, #initialize, #to_s, #vars, #vars_size, #|

Constructor Details

This class inherits a constructor from Ravensat::OprNode

Instance Method Details

#evalObject



11
12
13
# File 'lib/ravensat/ast/not_node.rb', line 11

def eval
  @children.map(&:eval).first ^ true
end

#to_dimacsObject



7
8
9
# File 'lib/ravensat/ast/not_node.rb', line 7

def to_dimacs
  "-"
end

#~@Object



3
4
5
# File 'lib/ravensat/ast/not_node.rb', line 3

def ~@
  @children.first
end