更新时间:2022-12-08 GMT+08:00
Triangle_count算法
您可以使用GES提供的接口执行triangle_count算法。示例代码如下
public static void executeAlgorithm(GraphClient graphClient) throws ApiException { //算法请求 AlgorithmReq req = new AlgorithmReq(); req.setAlgorithmName(AlgorithmNames.TRIANGLE_COUNT); //执行算法 AsyncAPIResp asyncAPIResp = graphClient.algorithmQuery(req); //获取JobId String jobId = asyncAPIResp.getJobId(); TriangleCountJobReq req1 = new TriangleCountJobReq(); req1.setJobId(jobId); //根据JobId查询算法执行结果 JobResp<QueryData<TriangleCountResult>> resp = graphClient.queryJobStatus(req1); System.out.println(resp); }
父主题: 执行算法