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


Java SparseSequence.getClass方法代码示例

本文整理汇总了Java中kodkod.util.ints.SparseSequence.getClass方法的典型用法代码示例。如果您正苦于以下问题:Java SparseSequence.getClass方法的具体用法?Java SparseSequence.getClass怎么用?Java SparseSequence.getClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kodkod.util.ints.SparseSequence的用法示例。


在下文中一共展示了SparseSequence.getClass方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: BooleanMatrix

import kodkod.util.ints.SparseSequence; //导入方法依赖的package包/类
/**
 * Constructs a new matrix with the given dimensions and factory, backed by
 * a sparse sequence which can most efficiently hold the elements storable
 * in the sparse sequences s0 and s1.
 * 
 * @ensures this.dimensions' = dimensions && this.factory' = factory &&
 *          this.elements' = [0..dimensions.capacity)->one FALSE
 */
private BooleanMatrix(Dimensions d, BooleanFactory f, SparseSequence<BooleanValue> s0,
		SparseSequence<BooleanValue> s1) {
	this.dims = d;
	this.factory = f;
	final Class< ? > c0 = s0.getClass(), c1 = s1.getClass();
	if (c0 != c1 || c0 == RangeSequence.class)
		this.cells = new RangeSequence<BooleanValue>();
	else if (c0 == HomogenousSequence.class)
		this.cells = new HomogenousSequence<BooleanValue>(TRUE, Ints.bestSet(d.capacity()));
	else
		this.cells = new TreeSequence<BooleanValue>();
}
 
开发者ID:AlloyTools,项目名称:org.alloytools.alloy,代码行数:21,代码来源:BooleanMatrix.java

示例2: BooleanMatrix

import kodkod.util.ints.SparseSequence; //导入方法依赖的package包/类
/**
 * Constructs a new matrix with the given dimensions and factory, 
 * backed by a sparse sequence which can most efficiently hold
 * the elements storable in the sparse sequences s0 and s1.
 * @ensures this.dimensions' = dimensions && this.factory' = factory && 
 *          this.elements' = [0..dimensions.capacity)->one FALSE 
 */
private BooleanMatrix(Dimensions d, BooleanFactory f, SparseSequence<BooleanValue> s0, SparseSequence<BooleanValue> s1) {
    this.dims = d;
    this.factory = f;
    final Class<?> c0 = s0.getClass(), c1 = s1.getClass();
    if (c0!=c1 || c0==RangeSequence.class) 
        this.cells = new  RangeSequence<BooleanValue>();
    else if (c0==HomogenousSequence.class) 
        this.cells = new HomogenousSequence<BooleanValue>(TRUE, Ints.bestSet(d.capacity())); 
    else 
        this.cells = new TreeSequence<BooleanValue>();  
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:19,代码来源:BooleanMatrix.java

示例3: BooleanMatrix

import kodkod.util.ints.SparseSequence; //导入方法依赖的package包/类
/**
 * Constructs a new matrix with the given dimensions and factory, 
 * backed by a sparse sequence which can most efficiently hold
 * the elements storable in the sparse sequences s0 and s1.
 * @ensures this.dimensions' = dimensions && this.factory' = factory && 
 *          this.elements' = [0..dimensions.capacity)->one FALSE 
 */
private BooleanMatrix(Dimensions d, BooleanFactory f, SparseSequence<BooleanValue> s0, SparseSequence<BooleanValue> s1) {
	this.dims = d;
	this.factory = f;
	final Class<?> c0 = s0.getClass(), c1 = s1.getClass();
	if (c0!=c1 || c0==RangeSequence.class) 
		this.cells = new RangeSequence<BooleanValue>();
	else if (c0==HomogenousSequence.class) 
		this.cells = new HomogenousSequence<BooleanValue>(TRUE, Ints.bestSet(d.capacity())); 
	else 
		this.cells = new TreeSequence<BooleanValue>();	
}
 
开发者ID:emina,项目名称:kodkod,代码行数:19,代码来源:BooleanMatrix.java


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