use of com.sri.ai.praise.core.representation.interfacebased.factor.core.DefaultVariableMarginalQuery in project aic-praise by aic-sri-international.
the class ExpressionBasedProblemToInterfaceBasedProblemConversion method translate.
public static Problem translate(ExpressionBasedProblem expressionBasedProblem) {
ExpressionVariable queryVariable = new DefaultExpressionVariable(expressionBasedProblem.getQuerySymbol());
ExpressionFactorNetwork factorNetwork = makeFactorNetwork(expressionBasedProblem);
Predicate<Expression> isExpressionParameterPredicate = expressionBasedProblem.getIsParameterPredicate();
Predicate<Variable> isParameterPredicate = makeIsParameterPredicate(isExpressionParameterPredicate);
Problem problem = new DefaultVariableMarginalQuery(queryVariable, factorNetwork, isParameterPredicate);
return problem;
}
Also used :
ExpressionFactorNetwork(com.sri.ai.praise.core.representation.interfacebased.factor.core.expression.core.ExpressionFactorNetwork)
DefaultExpressionVariable(com.sri.ai.praise.core.representation.interfacebased.factor.core.expression.core.DefaultExpressionVariable)
ExpressionVariable(com.sri.ai.praise.core.representation.interfacebased.factor.core.expression.api.ExpressionVariable)
Variable(com.sri.ai.praise.core.representation.interfacebased.factor.api.Variable)
DefaultExpressionVariable(com.sri.ai.praise.core.representation.interfacebased.factor.core.expression.core.DefaultExpressionVariable)
Expression(com.sri.ai.expresso.api.Expression)
DefaultVariableMarginalQuery(com.sri.ai.praise.core.representation.interfacebased.factor.core.DefaultVariableMarginalQuery)
DefaultExpressionVariable(com.sri.ai.praise.core.representation.interfacebased.factor.core.expression.core.DefaultExpressionVariable)
ExpressionVariable(com.sri.ai.praise.core.representation.interfacebased.factor.core.expression.api.ExpressionVariable)
ExpressionBasedProblem(com.sri.ai.praise.core.representation.classbased.expressionbased.api.ExpressionBasedProblem)
Problem(com.sri.ai.praise.core.representation.interfacebased.factor.api.Problem)