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


Java Graph.compute方法代码示例

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


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

示例1: apply

import org.apache.tinkerpop.gremlin.structure.Graph; //导入方法依赖的package包/类
public GraphComputer apply(final Graph graph) {
    GraphComputer computer = this.graphComputerClass.equals(GraphComputer.class) ? graph.compute() : graph.compute(this.graphComputerClass);
    for (final Map.Entry<String, Object> entry : this.configuration.entrySet()) {
        computer = computer.configure(entry.getKey(), entry.getValue());
    }
    if (-1 != this.workers)
        computer = computer.workers(this.workers);
    if (null != this.persist)
        computer = computer.persist(this.persist);
    if (null != this.resultGraph)
        computer = computer.result(this.resultGraph);
    if (null != this.vertices)
        computer = computer.vertices(this.vertices);
    if (null != this.edges)
        computer.edges(this.edges);
    return computer;
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:18,代码来源:Computer.java

示例2: create

import org.apache.tinkerpop.gremlin.structure.Graph; //导入方法依赖的package包/类
/**
 * @deprecated As of release 3.2.0. Please use {@link Graph#traversal(Class)}.
 */
@Deprecated
public ComputerTraversalEngine create(final Graph graph) {
    GraphComputer graphComputer = null == this.graphComputerClass ? graph.compute() : graph.compute(this.graphComputerClass);
    if (-1 != this.workers)
        graphComputer = graphComputer.workers(this.workers);
    if (null != this.vertexFilter)
        graphComputer = graphComputer.vertices(this.vertexFilter);
    if (null != this.edgeFilter)
        graphComputer = graphComputer.edges(this.edgeFilter);
    return new ComputerTraversalEngine(graphComputer);
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:15,代码来源:ComputerTraversalEngine.java

示例3: getGraphComputer

import org.apache.tinkerpop.gremlin.structure.Graph; //导入方法依赖的package包/类
@Override
public GraphComputer getGraphComputer(final Graph graph) {
    return graph.compute(GiraphGraphComputer.class);
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:5,代码来源:GiraphHadoopGraphProvider.java

示例4: getGraphComputer

import org.apache.tinkerpop.gremlin.structure.Graph; //导入方法依赖的package包/类
@Override
public GraphComputer getGraphComputer(final Graph graph) {
    return RANDOM.nextBoolean() ?
            graph.compute().workers(RANDOM.nextInt(3) + 1) :
            graph.compute(SparkGraphComputer.class);
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:7,代码来源:SparkHadoopGraphProvider.java

示例5: getGraphComputer

import org.apache.tinkerpop.gremlin.structure.Graph; //导入方法依赖的package包/类
/**
 * Create a {@link GraphComputer} from the {@link Graph} instance. The default implementation simply calls {@code graph.compute()}.
 *
 * @param graph the graph to get the graph computer from
 * @return a new graph computer
 */
public default GraphComputer getGraphComputer(final Graph graph) {
    return graph.compute();
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:10,代码来源:GraphProvider.java


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