org.aksw.isomorphism.ActionProblemContainer Maven / Gradle / Ivy
The newest version!
package org.aksw.isomorphism;
import java.util.function.BinaryOperator;
import java.util.function.Predicate;
import org.aksw.combinatorics.algos.StateProblemContainer;
import org.aksw.combinatorics.solvers.collections.ProblemContainer;
import org.aksw.state_space_search.core.Action;
import org.aksw.state_space_search.core.State;
public class ActionProblemContainer
implements Action
{
protected ProblemContainer problemContainer;
protected S partialSolution;
protected Predicate isUnsolveable;
protected BinaryOperator solutionCombiner;
protected double cost;
public ActionProblemContainer(S partialSolution, Predicate isUnsolveable, ProblemContainer problemContainer, BinaryOperator solutionCombiner) {
super();
//this.cost = pick.getPicked().getEstimatedCost();
this.partialSolution = partialSolution;
this.isUnsolveable = isUnsolveable;
this.problemContainer = problemContainer;
this.solutionCombiner = solutionCombiner;
}
@Override
public double getCost() {
//return cost;
return 1.0;
}
@Override
public State apply() {
//ProblemContainerImpl remaining = pick.getRemaining();
State result = new StateProblemContainer(partialSolution, isUnsolveable, problemContainer, solutionCombiner);
return result;
}
@Override
public String toString() {
return "ActionProblemContainer [problemContainer=" + problemContainer
+ ", partialSolution=" + partialSolution + ", solutionCombiner="
+ solutionCombiner + ", cost=" + cost + "]";
}
// public static ActionProblemContainer create(S partialSolution, ProblemContainer problemContainer) {
// ActionProblemContainer result = new ActionProblemContainer(problemContainer, partialSolution, solu);
// }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy