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

ai.libs.jaicore.search.probleminputs.GraphSearchInput Maven / Gradle / Ivy

package ai.libs.jaicore.search.probleminputs;

import org.api4.java.ai.graphsearch.problem.IPathSearchInput;
import org.api4.java.ai.graphsearch.problem.implicit.graphgenerator.IPathGoalTester;
import org.api4.java.datastructure.graph.implicit.IGraphGenerator;

/**
 * This input is provided to algorithms that should find a solution path in a graph without path cost.
 * That is, the set of solutions is exactly the set of paths from the root to a goal node.
 *
 * @author fmohr
 *
 * @param 
 * @param 
 */
public class GraphSearchInput implements IPathSearchInput {
	private final IGraphGenerator graphGenerator;
	private final IPathGoalTester goalTester;

	public GraphSearchInput(final IPathSearchInput inputToClone) {
		this(inputToClone.getGraphGenerator(), inputToClone.getGoalTester());
	}

	public GraphSearchInput(final IGraphGenerator graphGenerator, final IPathGoalTester goalTester) {
		super();
		this.graphGenerator = graphGenerator;
		this.goalTester = goalTester;
	}

	@Override
	public IGraphGenerator getGraphGenerator() {
		return this.graphGenerator;
	}

	@Override
	public IPathGoalTester getGoalTester() {
		return this.goalTester;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy