Search in sources :

Example 11 with FunctionTable

use of com.sri.ai.praise.core.representation.classbased.table.core.data.FunctionTable in project aic-praise by aic-sri-international.

the class UAIModelReader method readFunctionTables.

private static Map<Integer, FunctionTable> readFunctionTables(Preamble preamble, BufferedReader br) throws IOException {
    Map<Integer, FunctionTable> tableIdxToTable = new LinkedHashMap<>();
    // the first variable have the role of the 'most significant’ digit.
    for (int t = 0; t < preamble.numTables(); t++) {
        FunctionTable functionTable = createFunctionTable(preamble.cardinalitiesForTable(t), br);
        tableIdxToTable.put(t, functionTable);
    }
    return tableIdxToTable;
}
Also used : FunctionTable(com.sri.ai.praise.core.representation.classbased.table.core.data.FunctionTable) LinkedHashMap(java.util.LinkedHashMap)

Aggregations

FunctionTable (com.sri.ai.praise.core.representation.classbased.table.core.data.FunctionTable)11 ArrayList (java.util.ArrayList)8 LinkedHashMap (java.util.LinkedHashMap)5 Expression (com.sri.ai.expresso.api.Expression)4 CartesianProductEnumeration (com.sri.ai.util.collect.CartesianProductEnumeration)4 Map (java.util.Map)3 Beta (com.google.common.annotations.Beta)2 MultiQuantifierEliminator (com.sri.ai.grinder.api.MultiQuantifierEliminator)2 FactorTable (com.sri.ai.praise.core.representation.classbased.table.core.data.markov.FactorTable)2 Pair (com.sri.ai.util.base.Pair)2 BufferedReader (java.io.BufferedReader)2 List (java.util.List)2 Function (java.util.function.Function)2 Expressions (com.sri.ai.expresso.helper.Expressions)1 FALSE (com.sri.ai.expresso.helper.Expressions.FALSE)1 TRUE (com.sri.ai.expresso.helper.Expressions.TRUE)1 Expressions.apply (com.sri.ai.expresso.helper.Expressions.apply)1 Expressions.makeSymbol (com.sri.ai.expresso.helper.Expressions.makeSymbol)1 Context (com.sri.ai.grinder.api.Context)1 Compilation (com.sri.ai.grinder.application.Compilation)1