16.6.1 グラフ・サーバー(PGX)での組込みアルゴリズムについて
グラフ・サーバー(PGX)には、一連の組込みアルゴリズムが含まれており、Java APIおよびPython APIとして使用できます。
oracle.pgx.api.Analyst
クラスは、組込みアルゴリズムのセットを呼び出すための便利なメソッドを提供します。
たとえば、PageRankプロシージャの署名は次のとおりです。
/**
* Classic pagerank algorithm. Time complexity: O(E * K) with E = number of edges, K is a given constant (max
* iterations)
*
* @param graph
* graph
* @param e
* maximum error for terminating the iteration
* @param d
* damping factor
* @param max
* maximum number of iterations
* @return Vertex Property holding the result as a double
*/
public <ID extends Comparable<ID>> VertexProperty<ID, Double> pagerank(PgxGraph graph, double e, double d, int max);
親トピック: 組込みアルゴリズムの実行