commonMain.it.unibo.tuprolog.bdd.impl.builder.SimpleBinaryDecisionDiagramBuilder.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bdd-jvm Show documentation
Show all versions of bdd-jvm Show documentation
Multi-platform library for representing and manipulating Binary Decision Diagrams
package it.unibo.tuprolog.bdd.impl.builder
import it.unibo.tuprolog.bdd.BinaryDecisionDiagram
import it.unibo.tuprolog.bdd.BinaryDecisionDiagramBuilder
/**
* Implements a simple [BinaryDecisionDiagramBuilder] that does
* not apply platform-specific or reduction optimizations. This
* provides basic means to build represent BDDs, and keeps the entire
* data structure in memory in the form of a directed graph.
*
* @author Jason Dellaluce
* */
internal class SimpleBinaryDecisionDiagramBuilder> :
BinaryDecisionDiagramBuilder {
override fun buildVariable(
value: T,
low: BinaryDecisionDiagram,
high: BinaryDecisionDiagram
): BinaryDecisionDiagram {
return SimpleBinaryDecisionDiagramVariable(
value,
low,
high
)
}
override fun buildTerminal(truth: Boolean): BinaryDecisionDiagram {
return SimpleBinaryDecisionDiagramTerminal(
truth
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy