Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Lipen committed Jun 18, 2024
1 parent 872e57b commit 9fbc090
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/main/kotlin/com/github/lipen/bdd/BDD.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ class BDD(
private val storage = Storage(1 shl storageBits)
private val buckets = IntArray(1 shl bucketsBits)

val one = Ref(1) // terminal 1
val zero = Ref(-1) // terminal 0

init {
check(storage.alloc() == 1) // allocate the terminal node
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
}

val one = Ref(1) // terminal 1
val zero = Ref(-1) // terminal 0

val size: Int get() = storage.lastIndex
val realSize: Int get() = storage.realSize

Expand Down

0 comments on commit 9fbc090

Please sign in to comment.