本文整理汇总了Java中it.unimi.dsi.fastutil.objects.Object2DoubleOpenHashMap.getDouble方法的典型用法代码示例。如果您正苦于以下问题:Java Object2DoubleOpenHashMap.getDouble方法的具体用法?Java Object2DoubleOpenHashMap.getDouble怎么用?Java Object2DoubleOpenHashMap.getDouble使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类it.unimi.dsi.fastutil.objects.Object2DoubleOpenHashMap
的用法示例。
在下文中一共展示了Object2DoubleOpenHashMap.getDouble方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getGenericRelatedness
import it.unimi.dsi.fastutil.objects.Object2DoubleOpenHashMap; //导入方法依赖的package包/类
private double getGenericRelatedness(int wid1, int wid2, Object2DoubleOpenHashMap<Pair<Integer,Integer>> cache, String url){
if (wid2 < wid1) {
int tmp = wid2;
wid2 = wid1;
wid2 = tmp;
}
Pair <Integer,Integer> p = new Pair<Integer,Integer>(wid1,wid2);
if (!cache.containsKey(p))
cache.put(p, queryJsonRel(wid1, wid2, url));
return cache.getDouble(p);
}
示例2: interestingRules
import it.unimi.dsi.fastutil.objects.Object2DoubleOpenHashMap; //导入方法依赖的package包/类
public List<AssociationRule> interestingRules(double confidenceThreshold,
double interestThreshold,
Object2DoubleOpenHashMap<IntRBTreeSet> confidenceMap) {
List<AssociationRule> rules = model.learn(confidenceThreshold);
for (AssociationRule rule : rules) {
double interest = rule.confidence - confidenceMap.getDouble(rule.consequent);
if (Math.abs(interest) < interestThreshold) {
rules.remove(rule);
}
}
return rules;
}
示例3: getItemAspectModel
import it.unimi.dsi.fastutil.objects.Object2DoubleOpenHashMap; //导入方法依赖的package包/类
@Override
public ItemAspectModel<I, F> getItemAspectModel(List<Tuple2od<I>> items) {
Object2DoubleOpenHashMap<F> probNorm = new Object2DoubleOpenHashMap<>();
items.forEach(iv -> getItemIntents(iv.v1).forEach(f -> probNorm.addTo(f, iv.v2)));
return (iv, f) -> iv.v2 / probNorm.getDouble(f);
}