@@ -3,7 +3,7 @@ export Max2Poly, Polynomial, Tropical, CountingTropical, StaticBitVector, Mod, C
33export bitstringset_type, bitstringsampler_type
44
55using Polynomials: Polynomial
6- using TropicalNumbers: Tropical, CountingTropical, StaticBitVector
6+ using TropicalNumbers: Tropical, CountingTropical
77using Mods, Primes
88
99# patch for Tropical numbers
@@ -127,7 +127,7 @@ function Base.:*(x::ConfigEnumerator{L,C}, y::ConfigEnumerator{L,C}) where {L,C}
127127end
128128
129129Base. zero (:: Type{ConfigEnumerator{N,C}} ) where {N,C} = ConfigEnumerator {N,C} (StaticBitVector{N,C}[])
130- Base. one (:: Type{ConfigEnumerator{N,C}} ) where {N,C} = ConfigEnumerator {N,C} ([TropicalNumbers . staticfalses (StaticBitVector{N,C})])
130+ Base. one (:: Type{ConfigEnumerator{N,C}} ) where {N,C} = ConfigEnumerator {N,C} ([staticfalses (StaticBitVector{N,C})])
131131Base. zero (:: ConfigEnumerator{N,C} ) where {N,C} = zero (ConfigEnumerator{N,C})
132132Base. one (:: ConfigEnumerator{N,C} ) where {N,C} = one (ConfigEnumerator{N,C})
133133Base. show (io:: IO , x:: ConfigEnumerator ) = print (io, " {" , join (x. data, " , " ), " }" )
@@ -148,8 +148,8 @@ function Base.:*(x::ConfigSampler{L,C}, y::ConfigSampler{L,C}) where {L,C}
148148 ConfigSampler (x. data | y. data)
149149end
150150
151- Base. zero (:: Type{ConfigSampler{N,C}} ) where {N,C} = ConfigSampler {N,C} (TropicalNumbers . statictrues (StaticBitVector{N,C}))
152- Base. one (:: Type{ConfigSampler{N,C}} ) where {N,C} = ConfigSampler {N,C} (TropicalNumbers . staticfalses (StaticBitVector{N,C}))
151+ Base. zero (:: Type{ConfigSampler{N,C}} ) where {N,C} = ConfigSampler {N,C} (statictrues (StaticBitVector{N,C}))
152+ Base. one (:: Type{ConfigSampler{N,C}} ) where {N,C} = ConfigSampler {N,C} (staticfalses (StaticBitVector{N,C}))
153153Base. zero (:: ConfigSampler{N,C} ) where {N,C} = zero (ConfigSampler{N,C})
154154Base. one (:: ConfigSampler{N,C} ) where {N,C} = one (ConfigSampler{N,C})
155155
@@ -178,7 +178,7 @@ for (F,TP) in [(:bitstringset_type, :ConfigEnumerator), (:bitstringsampler_type,
178178 CountingTropical{TV, $ F (n)}
179179 end
180180 function $F (n:: Integer )
181- C = TropicalNumbers . _nints (n)
181+ C = _nints (n)
182182 return $ TP{n, C}
183183 end
184184 end
194194function onehotv (:: Type{CountingTropical{TV,BS}} , x) where {TV,BS}
195195 CountingTropical {TV,BS} (one (TV), onehotv (BS, x))
196196end
197- onehotv (:: Type{ConfigEnumerator{N,C}} , i:: Integer ) where {N,C} = ConfigEnumerator ([TropicalNumbers . onehot (StaticBitVector{N,C}, i)])
198- onehotv (:: Type{ConfigSampler{N,C}} , i:: Integer ) where {N,C} = ConfigSampler (TropicalNumbers . onehot (StaticBitVector{N,C}, i))
197+ onehotv (:: Type{ConfigEnumerator{N,C}} , i:: Integer ) where {N,C} = ConfigEnumerator ([onehotv (StaticBitVector{N,C}, i)])
198+ onehotv (:: Type{ConfigSampler{N,C}} , i:: Integer ) where {N,C} = ConfigSampler (onehotv (StaticBitVector{N,C}, i))
0 commit comments