GAS API的实施和使用 [英] GAS API implementation and usage

查看:258
本文介绍了GAS API的实施和使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试学习和使用GAS API在数据库上实现随机游走,将每个访问的顶点与起始顶点相关联.

I'm trying to learn and use the GAS API to implement a Random Walk over my database, associating every visited vertex to the starting vertex.

我在了解如何设法做到这一点时遇到了一些问题;我已经以PATHS,BFS,PR和其他GAS类为例进行了回顾,但是我不确定如何开始.

I'm having some issues understanding how I can manage to do this; I've been reviewing the PATHS, BFS, PR, and other GAS classes as examples, but I'm not quite sure how to start.

我认为我的实现应该扩展BaseGASProgram并实现所需的方法.同样,作为迭代,边界包含当前迭代的所有顶点.对我来说,前辈的概念也很清楚.

I think my implementation should extend BaseGASProgram and implement the needed methods. Also, as iterative, the frontier contains all the vertexes of the current iteration. The concept of predecessor is also clear to me.

但是我认为我不太了解聚集",应用",散布"哲学以及如何在这三个概念上分配随机游走".

But I don't think that I understand very well the Gather, Apply, Scatter philosophy and how to distribute the Random Walk over these three concepts.

此外,一旦实现代码,我该如何称呼它?我什至如何在代码中调用已经实现的算法(PR,SSSP,BFS等)?我应该实例化一个SSSP对象,然后呢?还是GASContext? GASRunnerBase?

Also, once I implement my code, how do I call it? How do I even call the already implemented algorithms (PR, SSSP, BFS, etc.) inside my code? Should I instantiate an SSSP object and then what? Or GASContext? GASRunnerBase?

推荐答案

看看要在测试用例上下文之外使用它,您需要创建某种SailConnection.有关示例,请参见 blazegraph-samples GitHub项目.然后您需要创建一个

To use it outside of the test case context, you need to create a SailConnection of some sort. See the blazegraph-samples GitHub project for examples. Then you need to create a SAILGASEngine. This should get you started in terms of calling the GASEngine directly at the Java layer.

这篇关于GAS API的实施和使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆