当前位置: 首页>>代码示例>>Java>>正文


Java ValueSet类代码示例

本文整理汇总了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;
}
 
开发者ID:Sable,项目名称:mclab-core,代码行数:13,代码来源:SimpleMatrixValuePropagator.java

示例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));
}
 
开发者ID:Sable,项目名称:mclab-core,代码行数:9,代码来源:SimpleMatrixValuePropagator.java

示例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));
}
 
开发者ID:Sable,项目名称:mclab-core,代码行数:9,代码来源:SimpleMatrixValuePropagator.java

示例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;
}
 
开发者ID:Sable,项目名称:mclab-core,代码行数:8,代码来源:FunctionHandleValue.java

示例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;
}
 
开发者ID:Sable,项目名称:mclab-core,代码行数:10,代码来源:CellValue.java

示例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;
    }
}
 
开发者ID:Sable,项目名称:mclab-core,代码行数:14,代码来源:CellValue.java

示例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;
}
 
开发者ID:Sable,项目名称:mclab-core,代码行数:16,代码来源:CellValue.java

示例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;
}
 
开发者ID:Sable,项目名称:mclab-core,代码行数:8,代码来源:StructValue.java

示例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);
    }
}
 
开发者ID:Sable,项目名称:mclab-core,代码行数:10,代码来源:StructValue.java

示例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)
					);
}
 
开发者ID:Sable,项目名称:mclab-core,代码行数:13,代码来源:BasicMatrixValue.java

示例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));
}
 
开发者ID:Sable,项目名称:mclab-core,代码行数:9,代码来源:BasicMatrixValuePropagator.java

示例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));
}
 
开发者ID:Sable,项目名称:mclab-core,代码行数:9,代码来源:BasicMatrixValuePropagator.java

示例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));
}
 
开发者ID:Sable,项目名称:mclab-core,代码行数:14,代码来源:AdvancedMatrixValuePropagator.java

示例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));
}
 
开发者ID:Sable,项目名称:mclab-core,代码行数:15,代码来源:AdvancedMatrixValuePropagator.java

示例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()));
}
 
开发者ID:Sable,项目名称:mclab-core,代码行数:10,代码来源:AdvancedMatrixValuePropagator.java


注:本文中的natlab.tame.valueanalysis.ValueSet类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。