当前位置: 首页>>代码示例>>Java>>正文


Java StatementPattern.getAssuredBindingNames方法代码示例

本文整理汇总了Java中org.openrdf.query.algebra.StatementPattern.getAssuredBindingNames方法的典型用法代码示例。如果您正苦于以下问题:Java StatementPattern.getAssuredBindingNames方法的具体用法?Java StatementPattern.getAssuredBindingNames怎么用?Java StatementPattern.getAssuredBindingNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openrdf.query.algebra.StatementPattern的用法示例。


在下文中一共展示了StatementPattern.getAssuredBindingNames方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAssuredBindingNames

import org.openrdf.query.algebra.StatementPattern; //导入方法依赖的package包/类
public Set<String> getAssuredBindingNames() {

        Set<String> bindingNames = Sets.newHashSet();

        for(final StatementPattern sp: nodes) {

            if(bindingNames.size() == 0) {
                bindingNames = sp.getAssuredBindingNames();
            } else {
                bindingNames = Sets.union(bindingNames, sp.getAssuredBindingNames());
            }

        }

        return bindingNames;

    }
 
开发者ID:apache,项目名称:incubator-rya,代码行数:18,代码来源:StarQuery.java

示例2: getSpJoinSelect

import org.openrdf.query.algebra.StatementPattern; //导入方法依赖的package包/类
private double getSpJoinSelect(RdfCloudTripleStoreConfiguration conf, TupleExpr te, StatementPattern sp1)
        throws TableNotFoundException {

    // System.out.println("Tuple is " + te + " and sp is " + sp1);

    if (te instanceof StatementPattern) {
        return getJoinSelect(conf, (StatementPattern) te, sp1);
    } else {

        SpExternalCollector spe = new SpExternalCollector();
        te.visit(spe);
        List<QueryModelNode> espList = spe.getSpExtTup();

        if (espList.size() == 0) {

            Set<String> tupBn = te.getAssuredBindingNames();
            Set<String> eBn = sp1.getAssuredBindingNames();
            Set<String> intersect = Sets.intersection(tupBn, eBn);

            return Math.pow(1.0 / 10000.0, intersect.size());

        }
        
        double min = Double.MAX_VALUE;
        double select = Double.MAX_VALUE;

        for (QueryModelNode node : espList) {

            if (node instanceof StatementPattern)
                select = getJoinSelect(conf, sp1, (StatementPattern) node);
            else if (node instanceof ExternalSet) {
                select = getExtJoinSelect(sp1, (ExternalSet) node);
            }

            if (min > select) {
                min = select;
            }
        }
        // System.out.println("Max is " + max);
        return min;
    }
}
 
开发者ID:apache,项目名称:incubator-rya,代码行数:43,代码来源:AccumuloSelectivityEvalDAO.java


注:本文中的org.openrdf.query.algebra.StatementPattern.getAssuredBindingNames方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。