• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java IntDoubleOpenHashMap类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中com.carrotsearch.hppc.IntDoubleOpenHashMap的典型用法代码示例。如果您正苦于以下问题:Java IntDoubleOpenHashMap类的具体用法?Java IntDoubleOpenHashMap怎么用?Java IntDoubleOpenHashMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

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

示例1: IntegerDoubleFrequency

点赞 2

import com.carrotsearch.hppc.IntDoubleOpenHashMap; //导入依赖的package包/类
public IntegerDoubleFrequency() {
    counts = new IntDoubleOpenHashMap();
    total = 0;
}
 

开发者ID:graben1437,
项目名称:titan0.5.4-hbase1.1.1-custom,
代码行数:5,
代码来源:IntegerDoubleFrequency.java

示例2: createExperimentTask

点赞 2

import com.carrotsearch.hppc.IntDoubleOpenHashMap; //导入依赖的package包/类
public void createExperimentTask(Model model, ExperimentTaskResult result, Resource superExpTask,
        List<Resource> experimentTasks) {
    // create Resource
    Resource experimentTask = model.createResource(generateExperimentTaskUri(result.idInDb));
    experimentTasks.add(experimentTask);
    if (model.containsResource(experimentTask)) {
        return;
    }
    experimentTask.addProperty(RDF.type, CUBE.Observation);

    // add annotator and dataset
    experimentTask.addProperty(GERBIL.annotator,
            gerbilURL + ANNOTATOR_DATAID + DataIDUtils.treatsNames(result.dataset) + DATAID_EXTENSION);
    experimentTask.addProperty(GERBIL.dataset,
            gerbilURL + DATASET_DATAID + DataIDUtils.treatsNames(result.annotator) + DATAID_EXTENSION);

    // set the status of this task
    model.add(experimentTask, GERBIL.statusCode, model.createTypedLiteral(result.state));

    if (superExpTask != null) {
        model.add(experimentTask, GERBIL.subExperimentOf, superExpTask);
    }

    // If this task has been finished
    if (ExperimentTaskStateHelper.taskFinished(result)) {
        // creating and setting literals for the current experiment
        model.add(experimentTask, GERBIL.microF1,
                model.createTypedLiteral(String.valueOf(result.getMicroF1Measure()), XSDDatatype.XSDdecimal));
        model.add(experimentTask, GERBIL.microPrecision,
                model.createTypedLiteral(String.valueOf(result.getMicroPrecision()), XSDDatatype.XSDdecimal));
        model.add(experimentTask, GERBIL.microRecall,
                model.createTypedLiteral(String.valueOf(result.getMicroRecall()), XSDDatatype.XSDdecimal));
        model.add(experimentTask, GERBIL.macroF1,
                model.createTypedLiteral(String.valueOf(result.getMacroF1Measure()), XSDDatatype.XSDdecimal));
        model.add(experimentTask, GERBIL.macroPrecision,
                model.createTypedLiteral(String.valueOf(result.getMacroPrecision()), XSDDatatype.XSDdecimal));
        model.add(experimentTask, GERBIL.macroRecall,
                model.createTypedLiteral(String.valueOf(result.getMacroRecall()), XSDDatatype.XSDdecimal));
        model.add(experimentTask, GERBIL.errorCount, model.createTypedLiteral(String.valueOf(result.errorCount)));

        if (result.hasAdditionalResults()) {
            IntDoubleOpenHashMap additionalResults = result.getAdditionalResults();
            String propertyUri;
            ResultNameToIdMapping mapping = ResultNameToIdMapping.getInstance();
            for (int i = 0; i < additionalResults.allocated.length; ++i) {
                if (additionalResults.allocated[i]) {
                    propertyUri = mapping.getResultName(additionalResults.keys[i]);
                    if (propertyUri != null) {
                        propertyUri = GERBIL.getURI() + propertyUri.replace(" ", "_");
                        model.add(experimentTask, model.createProperty(propertyUri), model.createTypedLiteral(
                                String.valueOf(additionalResults.values[i]), XSDDatatype.XSDdecimal));
                    }
                }
            }
        }
        if (result.hasSubTasks()) {
            for (ExperimentTaskResult subResult : result.getSubTasks()) {
                createExperimentTask(model, subResult, experimentTask, experimentTasks);
            }
        }
    }

    Calendar cal = Calendar.getInstance();
    cal.setTimeInMillis(result.timestamp);
    model.add(experimentTask, GERBIL.timestamp, model.createTypedLiteral(cal));
}
 

开发者ID:dice-group,
项目名称:gerbil,
代码行数:67,
代码来源:DataIDGenerator.java

示例3: getAdditionalResults

点赞 2

import com.carrotsearch.hppc.IntDoubleOpenHashMap; //导入依赖的package包/类
public IntDoubleOpenHashMap getAdditionalResults() {
    return additionalResults;
}
 

开发者ID:dice-group,
项目名称:gerbil,
代码行数:4,
代码来源:ExperimentTaskResult.java

示例4: setAdditionalResults

点赞 2

import com.carrotsearch.hppc.IntDoubleOpenHashMap; //导入依赖的package包/类
public void setAdditionalResults(IntDoubleOpenHashMap additionalResults) {
    this.additionalResults = additionalResults;
}
 

开发者ID:dice-group,
项目名称:gerbil,
代码行数:4,
代码来源:ExperimentTaskResult.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)