Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/nysol/zdd.rb

Instance Method Summary collapse

Instance Method Details

#+(other) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/nysol/zdd.rb', line 6

def +(other)
  if String == other.class then
    return ( self.plus(other) )   
  else
    return (ZDD.itemset(self) + other)
  end
end

#plusObject



5
# File 'lib/nysol/zdd.rb', line 5

alias_method :plus ,:+

#v(val = nil, to = "bottom") ⇒ Object

宣言してからzdd生成(引数がmoduleだった場合“+”とする)



15
16
17
18
19
20
21
22
23
24
# File 'lib/nysol/zdd.rb', line 15

def v(val=nil,to="bottom")    
  if ( val.kind_of? Module) then
    ZDD.symbol(self,nil,"bottom")
    base = ZDD.itemset(self)
    return base + val
  else 
    ZDD.symbol(self,val,to)
    return ZDD.itemset(self)
  end
end