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


Java SolutionSpace.getSize方法代码示例

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


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

示例1: FLASHAlgorithmImpl

import org.deidentifier.arx.framework.lattice.SolutionSpace; //导入方法依赖的package包/类
/**
 * Creates a new instance.
 *
 * @param solutionSpace
 * @param checker
 * @param strategy
 * @param config
 */
public FLASHAlgorithmImpl(SolutionSpace solutionSpace,
                          NodeChecker checker,
                          FLASHStrategy strategy,
                          FLASHConfiguration config) {

    super(solutionSpace, checker);
    if (solutionSpace.getSize() > Integer.MAX_VALUE) {
        throw new IllegalArgumentException();
    }
    this.checked = 0;
    this.solutionSpace.setAnonymityPropertyPredictable(config.isAnonymityPropertyPredicable());
    this.strategy = strategy;
    this.sortedSuccessors = new int[(int)solutionSpace.getSize()][];
    this.config = config;
    this.potentiallyInsufficientUtility = this.config.isPruneInsufficientUtility() ? 
                                          new LinkedList<Integer>() : null;
}
 
开发者ID:arx-deidentifier,项目名称:risk-benchmark,代码行数:26,代码来源:FLASHAlgorithmImpl.java

示例2: AlgorithmFlash

import org.deidentifier.arx.framework.lattice.SolutionSpace; //导入方法依赖的package包/类
/**
 * Creates a new instance.
 *
 * @param solutionSpace
 * @param checker
 * @param strategy
 */
public AlgorithmFlash(SolutionSpace solutionSpace, NodeChecker checker, FLASHStrategy strategy) {
    super(solutionSpace, checker);
    
    if (solutionSpace.getSize() > Integer.MAX_VALUE) {
        throw new IllegalArgumentException();
    }
    this.checked = 0;
    this.config = ((FLASHAlgorithmImpl)FLASHAlgorithm.create(solutionSpace, checker, strategy)).config;
    this.solutionSpace.setAnonymityPropertyPredictable(config.isAnonymityPropertyPredicable());
    this.strategy = strategy;
    this.sortedSuccessors = new int[(int)solutionSpace.getSize()][];
}
 
开发者ID:arx-deidentifier,项目名称:highdimensional-benchmark,代码行数:20,代码来源:AlgorithmFlash.java

示例3: FLASHStrategy

import org.deidentifier.arx.framework.lattice.SolutionSpace; //导入方法依赖的package包/类
/**
 * Creates a new instance.
 * 
 * @param solutionSpace the solution space
 * @param hierarchies the hierarchies
 */
public FLASHStrategy(final SolutionSpace solutionSpace,
                     final GeneralizationHierarchy[] hierarchies) {

    // Check
    if (solutionSpace.getSize() > Integer.MAX_VALUE) {
        throw new IllegalArgumentException("Solution space is too large for executing the FLASH algorithm");
    }
    
    // Store
    this.solutionSpace = solutionSpace;
    
    // Prepare information about levels
    int level = 0;
    this.maxLevels = solutionSpace.getTop().getGeneralization().clone();
    for (int i=0; i < this.maxLevels.length; i++) {
        level += this.maxLevels[i];
        this.maxLevels[i] ++;
    }
    this.maxlevel = level;
    
    // Prepare information about distinct values
    this.distinct = new int[hierarchies.length][];
    for (int i = 0; i < hierarchies.length; i++) {
        this.distinct[i] = hierarchies[i].getDistinctValues();
    }
    
    // Prepare cache
    this.cache = new double[(int)solutionSpace.getSize()][];
}
 
开发者ID:arx-deidentifier,项目名称:arx,代码行数:36,代码来源:FLASHStrategy.java

示例4: getAlgorithm

import org.deidentifier.arx.framework.lattice.SolutionSpace; //导入方法依赖的package包/类
/**
 * Returns an algorithm for the given problem instance
 * @param config
 * @param manager
 * @param solutionSpace
 * @param checker
 * @return
 */
private AbstractAlgorithm getAlgorithm(final ARXConfiguration config,
                                      final DataManager manager,
                                      final SolutionSpace solutionSpace,
                                      final NodeChecker checker) {
    
    if (config.isHeuristicSearchEnabled() || solutionSpace.getSize() > config.getHeuristicSearchThreshold()) {
        return LIGHTNINGAlgorithm.create(solutionSpace, checker, config.getHeuristicSearchTimeLimit(), config.getHeuristicSearchStepLimit());
        
    } else {
        FLASHStrategy strategy = new FLASHStrategy(solutionSpace, manager.getHierarchies());
        return FLASHAlgorithm.create(solutionSpace, checker, strategy);
    }
}
 
开发者ID:arx-deidentifier,项目名称:arx,代码行数:22,代码来源:ARXAnonymizer.java


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