use of com.sri.ai.praise.core.representation.interfacebased.factor.core.table.TableFactor in project aic-praise by aic-sri-international.
the class TestCases method uaiModelToListOfTableFactors.
public static ArrayList<TableFactor> uaiModelToListOfTableFactors(UAIModel model) {
TableFactorNetwork net = new TableFactorNetwork(model);
ArrayList<TableFactor> result = mapIntoArrayList(net.getAs(), (fwrapper) -> (TableFactor) fwrapper.getObject());
return result;
}
use of com.sri.ai.praise.core.representation.interfacebased.factor.core.table.TableFactor in project aic-praise by aic-sri-international.
the class ConstantFactor method multiplyWithTableFactor.
private TableFactor multiplyWithTableFactor(TableFactor table) {
TableFactor result;
ArrayList<Double> newEntries = new ArrayList<>(table.getEntries().size());
for (Double entry : table.getEntries()) {
newEntries.add(getConstant() * entry);
}
result = new TableFactor(table.getVariables(), newEntries);
return result;
}
Aggregations