本文整理汇总了Java中natlab.tame.valueanalysis.ValueSet类的典型用法代码示例。如果您正苦于以下问题:Java ValueSet类的具体用法?Java ValueSet怎么用?Java ValueSet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ValueSet类属于natlab.tame.valueanalysis包,在下文中一共展示了ValueSet类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: matchResultToRes
import natlab.tame.valueanalysis.ValueSet; //导入依赖的package包/类
private Res<AggrValue<SimpleMatrixValue>> matchResultToRes(List<Set<ClassReference>> matchResult){
//go through and fill in result
Res<AggrValue<SimpleMatrixValue>> result = Res.newInstance();
for (Set<ClassReference> values: matchResult){
HashMap<ClassReference,AggrValue<SimpleMatrixValue>> map = new HashMap<ClassReference,AggrValue<SimpleMatrixValue>>();
for (ClassReference classRef : values){
map.put(classRef,new SimpleMatrixValue(null, (PrimitiveClassReference)classRef));
}
result.add(ValueSet.newInstance(map));
}
return result;
}
示例2: caseCellhorzcat
import natlab.tame.valueanalysis.ValueSet; //导入依赖的package包/类
@Override
public Res<AggrValue<SimpleMatrixValue>> caseCellhorzcat(Builtin builtin,
Args<AggrValue<SimpleMatrixValue>> elements) {
ValueSet<AggrValue<SimpleMatrixValue>> values = ValueSet.newInstance(elements);
Shape shape = factory.getShapeFactory().newShapeFromValues(
Args.newInstance(factory.newMatrixValue(null, 1),factory.newMatrixValue(null, elements.size())));
return Res.<AggrValue<SimpleMatrixValue>>newInstance(new CellValue<SimpleMatrixValue>(this.factory, shape, values));
}
示例3: caseCellvertcat
import natlab.tame.valueanalysis.ValueSet; //导入依赖的package包/类
@Override
public Res<AggrValue<SimpleMatrixValue>> caseCellvertcat(Builtin builtin,
Args<AggrValue<SimpleMatrixValue>> elements) {
ValueSet<AggrValue<SimpleMatrixValue>> values = ValueSet.newInstance(elements);
Shape shape = factory.getShapeFactory().newShapeFromValues(
Args.newInstance(factory.newMatrixValue(null, elements.size()),factory.newMatrixValue(null, 1)));
return Res.<AggrValue<SimpleMatrixValue>>newInstance(new CellValue<SimpleMatrixValue>(this.factory, shape, values));
}
示例4: newInstance
import natlab.tame.valueanalysis.ValueSet; //导入依赖的package包/类
public static <D extends MatrixValue<D>> FunctionHandle<D> newInstance(FunctionReference function,
List<ValueSet<AggrValue<D>>> partialValues){
FunctionHandle<D> result = new FunctionHandle<D>();
result.function = function;
result.partialValues = new ArrayList<ValueSet<AggrValue<D>>>(partialValues);
return result;
}
示例5: CellValue
import natlab.tame.valueanalysis.ValueSet; //导入依赖的package包/类
/**
* creates cell array with given shape and internal values
*/
public CellValue(AggrValueFactory<D> factory, Shape shape, ValueSet<AggrValue<D>> values){
super(factory);
usesMap = false;
this.values = values;
this.shape = shape;
}
示例6: cellSubsasgn
import natlab.tame.valueanalysis.ValueSet; //导入依赖的package包/类
@Override
public CellValue<D> cellSubsasgn(Args<AggrValue<D>> indizes, Args<AggrValue<D>> values) {
if (indizes.isAllConstant() && shape.isConstant()){
throw new UnsupportedOperationException();
} else {
CellValue<D> result = new CellValue<D>(this.factory);
result.shape = this.shape.growByIndices(indizes);
result.usesMap = false;
result.isComplex = this.isComplex;
result.values = ValueSet.newInstance(values).merge(toSingleValues().values);
return result;
}
}
示例7: toSingleValues
import natlab.tame.valueanalysis.ValueSet; //导入依赖的package包/类
/**
* returns a cell value where all values are merged into one
* returns this if this cell value arleady satisfies that condition.
*/
public CellValue<D> toSingleValues(){
if (!usesMap) return this;
CellValue<D> result = new CellValue<D>(factory);
result.usesMap = false;
ValueSet<AggrValue<D>> values = ValueSet.newInstance();
for (int i : cellMap.keySet()){
values = values.merge(result.cellMap.get(i));
}
result.values = values;
return result;
}
示例8: dotSubsasgn
import natlab.tame.valueanalysis.ValueSet; //导入依赖的package包/类
@Override
public StructValue<D> dotSubsasgn(String field, AggrValue<D> value) {
StructValue<D> result = new StructValue<D>(factory);
result.structMap = new HashMap<String,ValueSet<AggrValue<D>>>(structMap);
result.structMap.put(field, ValueSet.newInstance(value));
return result;
}
示例9: dotSubsref
import natlab.tame.valueanalysis.ValueSet; //导入依赖的package包/类
@Override
public ValueSet<AggrValue<D>> dotSubsref(String field) {
if (structMap.containsKey(field)){
return structMap.get(field);
} else {
throw new UnsupportedOperationException(
"attempted to access struct with non-existing field "+field);
}
}
示例10: arraySubsref
import natlab.tame.valueanalysis.ValueSet; //导入依赖的package包/类
@Override
public ValueSet<AggrValue<BasicMatrixValue>> arraySubsref(
Args<AggrValue<BasicMatrixValue>> indizes) {
return ValueSet.<AggrValue<BasicMatrixValue>> newInstance(
factory.newMatrixValueFromClassShapeRange(
getSymbolic()
, getMatlabClass()
, shapePropagator.arraySubsref(shape, indizes)
, null
, complex)
);
}
示例11: caseCellhorzcat
import natlab.tame.valueanalysis.ValueSet; //导入依赖的package包/类
@Override
public Res<AggrValue<BasicMatrixValue>> caseCellhorzcat(Builtin builtin,
Args<AggrValue<BasicMatrixValue>> elements) {
ValueSet<AggrValue<BasicMatrixValue>> values = ValueSet.newInstance(elements);
Shape shape = factory.getShapeFactory().newShapeFromValues(
Args.newInstance(factory.newMatrixValue(null, 1),factory.newMatrixValue(null, elements.size())));
return Res.<AggrValue<BasicMatrixValue>>newInstance(new CellValue<BasicMatrixValue>(factory, shape, values));
}
示例12: caseCellvertcat
import natlab.tame.valueanalysis.ValueSet; //导入依赖的package包/类
@Override
public Res<AggrValue<BasicMatrixValue>> caseCellvertcat(Builtin builtin,
Args<AggrValue<BasicMatrixValue>> elements) {
ValueSet<AggrValue<BasicMatrixValue>> values = ValueSet.newInstance(elements);
Shape shape = factory.getShapeFactory().newShapeFromValues(
Args.newInstance(factory.newMatrixValue(null, elements.size()),factory.newMatrixValue(null, 1)));
return Res.<AggrValue<BasicMatrixValue>>newInstance(new CellValue<BasicMatrixValue>(factory, shape, values));
}
示例13: caseCellhorzcat
import natlab.tame.valueanalysis.ValueSet; //导入依赖的package包/类
@Override
public Res<AggrValue<AdvancedMatrixValue>> caseCellhorzcat(Builtin builtin,
Args<AggrValue<AdvancedMatrixValue>> elements) {
ValueSet<AggrValue<AdvancedMatrixValue>> values = ValueSet
.newInstance(elements);
Shape shape = factory.getShapeFactory()
.newShapeFromValues(
Args.newInstance(factory.newMatrixValue(null, 1),
factory.newMatrixValue(null, elements.size())));
return Res
.<AggrValue<AdvancedMatrixValue>> newInstance(new CellValue<AdvancedMatrixValue>(
this.factory, shape, values));
}
示例14: caseCellvertcat
import natlab.tame.valueanalysis.ValueSet; //导入依赖的package包/类
@Override
public Res<AggrValue<AdvancedMatrixValue>> caseCellvertcat(Builtin builtin,
Args<AggrValue<AdvancedMatrixValue>> elements) {
ValueSet<AggrValue<AdvancedMatrixValue>> values = ValueSet
.newInstance(elements);
Shape shape = factory.getShapeFactory()
.newShapeFromValues(
Args.newInstance(
factory.newMatrixValue(null, elements.size()),
factory.newMatrixValue(null, 1)));
return Res
.<AggrValue<AdvancedMatrixValue>> newInstance(new CellValue<AdvancedMatrixValue>(
this.factory, shape, values));
}
示例15: caseCell
import natlab.tame.valueanalysis.ValueSet; //导入依赖的package包/类
@Override
public Res<AggrValue<AdvancedMatrixValue>> caseCell(Builtin builtin,
Args<AggrValue<AdvancedMatrixValue>> arg) {
return Res
.<AggrValue<AdvancedMatrixValue>> newInstance(new CellValue<AdvancedMatrixValue>(
this.factory, factory.getShapeFactory()
.newShapeFromValues(arg), ValueSet
.<AggrValue<AdvancedMatrixValue>> newInstance()));
}