本文整理汇总了Java中com.sri.ai.util.Util.arrayList方法的典型用法代码示例。如果您正苦于以下问题:Java Util.arrayList方法的具体用法?Java Util.arrayList怎么用?Java Util.arrayList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sri.ai.util.Util
的用法示例。
在下文中一共展示了Util.arrayList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AbstractSingleVariableConstraint
import com.sri.ai.util.Util; //导入方法依赖的package包/类
public AbstractSingleVariableConstraint(Expression variable, Theory theory) {
this(variable, Util.arrayList(), Util.arrayList(), Util.arrayList(), theory);
}
示例2: AbstractSingleVariableConstraintWithIndependentNormalizedAtoms
import com.sri.ai.util.Util; //导入方法依赖的package包/类
public AbstractSingleVariableConstraintWithIndependentNormalizedAtoms(Expression variable, Theory theory) {
this(variable, Util.arrayList(), Util.arrayList(), Util.arrayList(), theory);
}
开发者ID:aic-sri-international,项目名称:aic-expresso,代码行数:4,代码来源:AbstractSingleVariableConstraintWithIndependentNormalizedAtoms.java
示例3: AbstractSingleVariableConstraintWithDependentNormalizedAtoms
import com.sri.ai.util.Util; //导入方法依赖的package包/类
public AbstractSingleVariableConstraintWithDependentNormalizedAtoms(Expression variable, Theory theory) {
this(variable, Util.arrayList(), Util.arrayList(), Util.arrayList(), theory);
}
开发者ID:aic-sri-international,项目名称:aic-expresso,代码行数:4,代码来源:AbstractSingleVariableConstraintWithDependentNormalizedAtoms.java
示例4: RandomConditionalPotentialExpressionGenerator
import com.sri.ai.util.Util; //导入方法依赖的package包/类
public RandomConditionalPotentialExpressionGenerator(Random random,
RandomHOGMv1Generator.TheoryTypePropositionalArgs[] propositionTheoryArgs,
RandomHOGMv1Generator.TheoryTypeEqualityArgs[] equalityTheoryArgs,
RandomHOGMv1Generator.TheoryTypeInequalityArgs[] inequalityTheoryArgs,
int depth) {
TheoryTestingSupport theoryTestingSupport = newTheoryTestingSupport(random, propositionTheoryArgs, equalityTheoryArgs, inequalityTheoryArgs);
Map<String, Type> varToTypeMap = new LinkedHashMap<>();
if (propositionTheoryArgs.length > 0) {
Categorical booleanCategorical = new Categorical(HOGMSortDeclaration.IN_BUILT_BOOLEAN.getName().toString(), 2, Util.arrayList(Expressions.FALSE, Expressions.TRUE));
for (int i = 0; i < propositionTheoryArgs.length; i++) {
RandomHOGMv1Generator.TheoryTypePropositionalArgs propositionalArgs = propositionTheoryArgs[i];
for (int v = 0; v < propositionalArgs.getNumberVariables(); v++) {
varToTypeMap.put(getPropositionalVariableNameFor(i, v), booleanCategorical);
}
}
}
// Output the random variable information for equality theories
for (int i = 0; i < equalityTheoryArgs.length; i++) {
RandomHOGMv1Generator.TheoryTypeEqualityArgs equalityArgs = equalityTheoryArgs[i];
ArrayList<Expression> uniquelyNamedConstants = new ArrayList<>();
final int categoryIndex = i;
IntStream.range(0, equalityArgs.getNumberOfUniquelyNamedConstantsInCategory())
.mapToObj(variableIndex -> makeSymbol(getCategoryUniquelyNamedConstantName(categoryIndex, variableIndex)))
.forEach(uniquelyNamedConstants::add);
Categorical equalityCategorical = new Categorical(RandomHOGMv1Generator.getEqualityCategoricalName(i), equalityArgs.getSizeOfCategory(), uniquelyNamedConstants);
for (int v = 0; v < equalityArgs.getNumberVariables(); v++) {
varToTypeMap.put(getEqualityVariableNameFor(i, v), equalityCategorical);
}
}
// Output the random variable information for the inequality theories
for (int i = 0; i < inequalityTheoryArgs.length; i++) {
RandomHOGMv1Generator.TheoryTypeInequalityArgs inequalityArgs = inequalityTheoryArgs[i];
IntegerInterval integerInterval = new IntegerInterval(inequalityArgs.getStartIntervalInclusive(), inequalityArgs.getEndIntervalInclusive());
for (int v = 0; v < inequalityArgs.getNumberVariables(); v++) {
varToTypeMap.put(getInequalityVariableNameFor(i, v), integerInterval);
}
}
theoryTestingSupport.setVariableNamesAndTypesForTesting(varToTypeMap);
Context context = theoryTestingSupport.makeContextWithTestingInformation();
randomConditionalGenerator = new RandomConditionalExpressionGenerator(theoryTestingSupport, depth,
() -> makeSymbol(random.nextDouble()),
context);
}