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

info.scce.addlib.dd.xdd.grouplikedd.example.CountVectorDDManager Maven / Gradle / Ivy

Go to download

The Java Library for Algebraic Decision Diagrams, Code Generation, and Layouting

There is a newer version: 3.1.0
Show newest version
package info.scce.addlib.dd.xdd.grouplikedd.example;

import info.scce.addlib.dd.xdd.grouplikedd.MonoidDDManager;

public class CountVectorDDManager extends MonoidDDManager {

    private final int n;

    public CountVectorDDManager(int n, int numVars, int numVarsZ, int numSlots, int cacheSize, long maxMemory) {
        super(numVars, numVarsZ, numSlots, cacheSize, maxMemory);
        this.n = n;
    }

    public CountVectorDDManager(int n, int numVars, int numVarsZ, long maxMemory) {
        super(numVars, numVarsZ, maxMemory);
        this.n = n;
    }

    public CountVectorDDManager(int n) {
        super();
        this.n = n;
    }

    @Override
    protected CountVector neutralElement() {
        return CountVector.zero(n);
    }

    @Override
    protected CountVector join(CountVector left, CountVector right) {
        return left.add(right);
    }

    @Override
    public CountVector parseElement(String str) {
        return CountVector.parseCountVector(str);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy