本文整理汇总了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;
}
示例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()][];
}
示例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()][];
}
示例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);
}
}