We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 872e57b commit 9fbc090Copy full SHA for 9fbc090
src/main/kotlin/com/github/lipen/bdd/BDD.kt
@@ -20,14 +20,15 @@ class BDD(
20
private val storage = Storage(1 shl storageBits)
21
private val buckets = IntArray(1 shl bucketsBits)
22
23
- val one = Ref(1) // terminal 1
24
- val zero = Ref(-1) // terminal 0
25
-
26
init {
27
- check(storage.alloc() == 1) // allocate the terminal node
28
- buckets[0] = 1 // store the terminal node in the 0th bucket
+ val terminal = storage.alloc() // allocate the terminal node
+ check(terminal == 1)
+ buckets[0] = terminal // store the terminal node in the 0th bucket
29
}
30
+ val one = Ref(1) // terminal 1
+ val zero = Ref(-1) // terminal 0
31
+
32
val size: Int get() = storage.lastIndex
33
val realSize: Int get() = storage.realSize
34
0 commit comments