本文整理汇总了Java中org.apache.lucene.util.OpenBitSet.or方法的典型用法代码示例。如果您正苦于以下问题:Java OpenBitSet.or方法的具体用法?Java OpenBitSet.or怎么用?Java OpenBitSet.or使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.lucene.util.OpenBitSet
的用法示例。
在下文中一共展示了OpenBitSet.or方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addFunctionalDependencyIfNotInvalid
import org.apache.lucene.util.OpenBitSet; //导入方法依赖的package包/类
public FDTreeElement addFunctionalDependencyIfNotInvalid(OpenBitSet lhs, OpenBitSet rhs) {
FDTreeElement currentNode = this;
currentNode.addRhsAttributes(rhs);
OpenBitSet invalidFds = currentNode.rhsAttributes.clone();
int lhsLength = 0;
for (int i = lhs.nextSetBit(0); i >= 0; i = lhs.nextSetBit(i + 1)) {
lhsLength++;
if (currentNode.getChildren() == null) {
currentNode.setChildren(new FDTreeElement[this.numAttributes]);
currentNode.getChildren()[i] = new FDTreeElement(this.numAttributes);
}
else if (currentNode.getChildren()[i] == null) {
currentNode.getChildren()[i] = new FDTreeElement(this.numAttributes);
}
currentNode = currentNode.getChildren()[i];
invalidFds.and(currentNode.rhsFds);
currentNode.addRhsAttributes(rhs);
}
rhs.andNot(invalidFds);
currentNode.markFds(rhs);
rhs.or(invalidFds);
this.depth = Math.max(this.depth, lhsLength);
return currentNode;
}
示例2: generateNextLevel
import org.apache.lucene.util.OpenBitSet; //导入方法依赖的package包/类
private void generateNextLevel() {
// System.out.println("Start generateNextLevel");
level0 = level1;
level1 = null;
System.gc();
Object2ObjectOpenHashMap<OpenBitSet, CombinationHelper> new_level = new Object2ObjectOpenHashMap<OpenBitSet, CombinationHelper>();
buildPrefixBlocks();
for (ObjectArrayList<OpenBitSet> prefix_block_list : prefix_blocks.values()) {
// continue only, if the prefix_block contains at least 2 elements
if (prefix_block_list.size() < 2) {
continue;
}
ObjectArrayList<OpenBitSet[]> combinations = getListCombinations(prefix_block_list);
for (OpenBitSet[] c : combinations) {
OpenBitSet X = (OpenBitSet) c[0].clone();
X.or(c[1]);
if (checkSubsets(X)) {
StrippedPartition st = multiply(level0.get(c[0]).getPartition(), level0.get(c[1]).getPartition());
OpenBitSet rhsCandidates = new OpenBitSet();
// rhsCandidates.set(1, numberAttributes+1);
CombinationHelper ch = new CombinationHelper();
ch.setPartition(st);
ch.setRhsCandidates(rhsCandidates);
new_level.put(X, ch);
}
}
}
level1 = new_level;
}
示例3: generateNextLevel
import org.apache.lucene.util.OpenBitSet; //导入方法依赖的package包/类
private void generateNextLevel() {
// System.out.println("Start generateNextLevel");
level0 = level1;
level1 = null;
System.gc();
Object2ObjectOpenHashMap<OpenBitSet, CombinationHelper> new_level = new Object2ObjectOpenHashMap<OpenBitSet, CombinationHelper>();
buildPrefixBlocks();
for (ObjectArrayList<OpenBitSet> prefix_block_list : prefix_blocks.values()) {
// continue only, if the prefix_block contains at least 2 elements
if (prefix_block_list.size() < 2) {
continue;
}
ObjectArrayList<OpenBitSet[]> combinations = getListCombinations(prefix_block_list);
for (OpenBitSet[] c : combinations) {
OpenBitSet X = (OpenBitSet) c[0].clone();
X.or(c[1]);
if (checkSubsets(X)) {
StrippedPartition st = multiply(level0.get(c[0]).getPartition(), level0.get(c[1]).getPartition());
OpenBitSet rhsCandidates = new OpenBitSet();
// rhsCandidates.set(1, numberAttributes+1);
CombinationHelper ch = new CombinationHelper();
ch.setPartition(st);
ch.setRhsCandidates(rhsCandidates);
new_level.put(X, ch);
}
}
}
level1 = new_level;
// System.out.println("Finished generateNextLevel");
}
开发者ID:HPI-Information-Systems,项目名称:metanome-algorithms,代码行数:40,代码来源:TaneAlgorithmFilterTreeDirect.java
示例4: generateNextLevel
import org.apache.lucene.util.OpenBitSet; //导入方法依赖的package包/类
private Set<OpenBitSet> generateNextLevel(Set<OpenBitSet> li) {
// Join-Step
List<OpenBitSet> Ck = new LinkedList<OpenBitSet>();
for (OpenBitSet p : li) {
for (OpenBitSet q : li) {
if (!this.checkJoinCondition(p, q)) {
continue;
}
OpenBitSet candidate = new OpenBitSet();
candidate.or(p);
candidate.or(q);
Ck.add(candidate);
}
}
// Pruning-Step
Set<OpenBitSet> result = new HashSet<OpenBitSet>();
for (OpenBitSet c : Ck) {
boolean prune = false;
int lastIndex = c.nextSetBit(0);
while (lastIndex != -1) {
c.flip(lastIndex);
if (!li.contains(c)) {
prune = true;
break;
}
c.flip(lastIndex);
lastIndex = c.nextSetBit(lastIndex + 1);
}
if (!prune) {
result.add(c);
}
}
return result;
}
示例5: generateNextLevel
import org.apache.lucene.util.OpenBitSet; //导入方法依赖的package包/类
private void generateNextLevel() {
level0 = level1;
level1 = null;
System.gc();
Object2ObjectOpenHashMap<OpenBitSet, CombinationHelper> new_level = new Object2ObjectOpenHashMap<OpenBitSet, CombinationHelper>();
buildPrefixBlocks();
for (ObjectArrayList<OpenBitSet> prefix_block_list : prefix_blocks.values()) {
// continue only, if the prefix_block contains at least 2 elements
if (prefix_block_list.size() < 2) {
continue;
}
ObjectArrayList<OpenBitSet[]> combinations = getListCombinations(prefix_block_list);
for (OpenBitSet[] c : combinations) {
OpenBitSet X = (OpenBitSet) c[0].clone();
X.or(c[1]);
if (checkSubsets(X)) {
StrippedPartition st = null;
CombinationHelper ch = new CombinationHelper();
if (level0.get(c[0]).isValid() && level0.get(c[1]).isValid()) {
st = multiply(level0.get(c[0]).getPartition(), level0.get(c[1]).getPartition());
} else {
ch.setInvalid();
}
OpenBitSet rhsCandidates = new OpenBitSet();
ch.setPartition(st);
ch.setRhsCandidates(rhsCandidates);
new_level.put(X, ch);
}
}
}
level1 = new_level;
}