本文整理匯總了Java中it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap.containsKey方法的典型用法代碼示例。如果您正苦於以下問題:Java Long2ObjectOpenHashMap.containsKey方法的具體用法?Java Long2ObjectOpenHashMap.containsKey怎麽用?Java Long2ObjectOpenHashMap.containsKey使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap
的用法示例。
在下文中一共展示了Long2ObjectOpenHashMap.containsKey方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: checkAndStore
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; //導入方法依賴的package包/類
protected <T> void checkAndStore(long entityId, Class<? super T> type) {
if (isTransaction) {
LongOpenHashSet entityAdded = added.get(type);
if (entityAdded.contains(entityId))
return;
T oldT = repository.get((Class<T>)type, entityId);
Long2ObjectOpenHashMap<Object> data = snapshotted.get(type);
if (oldT == null) {
entityAdded.add(entityId);
} else if (!data.containsKey(entityId)) {
data.put(entityId, oldT);
}
}
}
示例2: combineClusterIntoResult
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; //導入方法依賴的package包/類
protected void combineClusterIntoResult(ColumnCombinationBitset partialUnique)
throws AlgorithmExecutionException {
LongArrayList touchedCluster = new LongArrayList();
Long2LongOpenHashMap partialUniqueHash = this.algorithm.getPLI(partialUnique).asHashMap();
Set<ColumnCombinationBitset> startPoints = this.getConditionStartPoints();
for (ColumnCombinationBitset minimalConditionStartPoint : startPoints) {
if (minimalConditionStartPoint.getSetBits().size() != 1) {
minimalConditionStartPoint =
minimalConditionStartPoint.getContainedOneColumnCombinations().get(0);
}
List<ConditionEntry> satisfiedCluster = new ArrayList<>();
Long2ObjectOpenHashMap<LongArrayList> intersectingCluster = new Long2ObjectOpenHashMap<>();
int clusterNumber = 0;
//build intersecting cluster
for (ConditionEntry singleCluster : this.singleConditions.get(minimalConditionStartPoint)) {
satisfiedCluster.add(singleCluster.setClusterNumber(clusterNumber));
touchedCluster.clear();
for (long rowNumber : singleCluster.cluster) {
if (partialUniqueHash.containsKey(rowNumber)) {
touchedCluster.add(partialUniqueHash.get(rowNumber));
}
}
for (long partialUniqueClusterNumber : touchedCluster) {
if (intersectingCluster.containsKey(partialUniqueClusterNumber)) {
intersectingCluster.get(partialUniqueClusterNumber).add(clusterNumber);
} else {
LongArrayList newConditionClusterNumbers = new LongArrayList();
newConditionClusterNumbers.add(clusterNumber);
intersectingCluster.put(partialUniqueClusterNumber, newConditionClusterNumbers);
}
}
clusterNumber++;
}
intersectingCluster = purgeIntersectingClusterEntries(intersectingCluster);
//convert into list
List<LongArrayList> intersectingClusterList = new ArrayList<>();
for (long partialUniqueCluster : intersectingCluster.keySet()) {
intersectingClusterList.add(intersectingCluster.get(partialUniqueCluster));
}
Object2FloatArrayMap<List<ConditionEntry>>
clustergroups =
this.combineClusters(this.algorithm.frequency, satisfiedCluster,
intersectingClusterList);
for (List<ConditionEntry> singleCondition : clustergroups.keySet()) {
ResultSingleton.getInstance().addConditionToResult(partialUnique, singleCondition,
clustergroups.get(singleCondition));
}
}
}