All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.it.unibo.tuprolog.bdd.impl.builder.SimpleBinaryDecisionDiagramBuilder.kt Maven / Gradle / Ivy

Go to download

Multi-platform library for representing and manipulating Binary Decision Diagrams

There is a newer version: 1.0.4
Show newest version
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