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

fr.lirmm.graphik.integraal.homomorphism.scheduler.AbstractScheduler Maven / Gradle / Ivy

There is a newer version: 1.6.1
Show newest version
package fr.lirmm.graphik.integraal.homomorphism.scheduler;

import fr.lirmm.graphik.integraal.api.core.InMemoryAtomSet;
import fr.lirmm.graphik.integraal.api.core.Substitution;
import fr.lirmm.graphik.integraal.api.core.Variable;
import fr.lirmm.graphik.integraal.core.factory.DefaultSubstitutionFactory;
import fr.lirmm.graphik.integraal.core.term.DefaultTermFactory;
import fr.lirmm.graphik.util.profiler.AbstractProfilable;

public abstract class AbstractScheduler extends AbstractProfilable implements Scheduler {
	
	
	protected static InMemoryAtomSet computeFixedQuery(InMemoryAtomSet atomset, Iterable fixedTerms) {
		// create a Substitution for fixed query
		Substitution fixSub = DefaultSubstitutionFactory.instance().createSubstitution();
		for (Variable t : fixedTerms) {
			fixSub.put(t, DefaultTermFactory.instance().createConstant(t.getLabel()));
		}

		return fixSub.createImageOf(atomset);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy